microsoft / vscode-java-debug

Java Debugger for Visual Studio Code.
Other
530 stars 339 forks source link

How do I properly set the property ProjectName for a JNI program? #1513

Closed X1nLi closed 4 weeks ago

X1nLi commented 1 month ago

My project is using C++ to call JAVA code via JNI and there is no static main method in the code. When using the debugging watch function, the program reminds me that I need to specify the projectName in launch.json, but I don't know where this ProjectName comes from?

Environment

this is my launch.json:

            "type": "java",
            "name": "mydebug",
            "request": "attach",
            "hostName": "localhost",
            "port": 8002
testforstephen commented 4 weeks ago

You can use Java Projects view to find out what Java project your source file is located.

Image