Add ability customize resolved classpaths#108
Add ability customize resolved classpaths#108supersonicclay wants to merge 3 commits intomicrosoft:mainfrom
Conversation
|
@claycephas thanks for the PR. A little concern about the option |
| - `sourcePaths` - The extra source directories of the program. The debugger looks for source code from project settings by default. This option allows the debugger to look for source code in extra directories. | ||
| - `classPaths` - The classpaths for launching the JVM. If not specified, the debugger will automatically resolve from current project. | ||
| - `classPathsToAdd` - Additional classpaths to add before launching the JVM. | ||
| - `classPathsToRemove` - Classpaths to remove before when launching the JVM. |
There was a problem hiding this comment.
A little concern about this option. Can you list some scenarios that needs this option?
|
When debugging my maven-based project with VS Code, it is including test classes in the classpath. However, IntelliJ and Eclipse don't include those test classes in the classpath. I thought the |
|
Including test classes in auto resolved maven classpaths looks like a bug. I open a bug for this. #111 And the existing if we change the current |
|
How about add a flag option to turn auto resolved true/false and |
|
@claycephas @jopbrown Your suggestion could be a choice. And i also find a new choice to keep compatible with current behavior. Reference to |
|
@testforstephen |
|
@testforstephen Regarding placing generated classpaths in @jopbrown Regarding your suggestion, there'd be no way to remove a specific problematic classpath (e.g. like The thing I like about |
|
@claycephas We're supporting java 9, it uses a new option |
|
This PR is replaced by PR #1005, which uses the predefined variables in classPaths/modulePaths of launch.json to customize the classpaths. Here is the predefined variables:
You can see the sample below to add/remove classpath to launch.json. {
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Launch Foo",
"request": "launch",
"mainClass": "foo.bar.Foo",
"classPaths": [
"$Auto",
"<extra class path>",
"!<excluded class path>
]
}
]
}
|
Adds the following to
launch.json:classPathsToAdd- Additional classpaths to add before launching the JVM.classPathsToRemove- Classpaths to remove before when launching the JVM.Fixes #93