Skip to content

Commit 8346a11

Browse files
committed
Java debug adapter returns broken breakpoints info response
1 parent 31e376b commit 8346a11

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

python3/vimspector/debug_session.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,12 @@ def AddDataBreakpoint( self, opts, buf = None, line_num = None ):
10041004
# Use the parent session, because the _connection_ comes from the
10051005
# variable/watch result that is actually chosen
10061006

1007-
def add_bp( conn, breakpoint_info ):
1007+
def add_bp( conn, msg ):
1008+
breakpoint_info = msg.get( 'body' )
1009+
if not breakpoint_info:
1010+
utils.UserMessage( "Can't set data breakpoint here" )
1011+
return
1012+
10081013
if breakpoint_info[ 'dataId' ] is None:
10091014
utils.UserMessage(
10101015
f"Can't set data breakpoint here: {breakpoint_info[ 'description' ]}"

python3/vimspector/variables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ def GetDataBreakpointInfo( self,
749749
variable.container.VariablesReference() )
750750

751751
variable.connection.DoRequest( lambda msg: then( variable.connection,
752-
msg[ 'body' ] ), {
752+
msg ), {
753753
'command': 'dataBreakpointInfo',
754754
'arguments': arguments,
755755
} )

support/test/java/test_project/.vimspector.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"mainClass": "com.vimspector.test.TestApplication",
88
"sourcePaths": [ "${workspaceRoot}/src/main/java" ],
99
"classPaths": [ "${workspaceRoot}/target/classes" ],
10+
"project": "TestApplication",
1011
"args": "hello world!",
1112
"stopOnEntry": true,
1213
"console": "integratedTerminal",
@@ -20,6 +21,7 @@
2021
"configuration": {
2122
"request": "attach",
2223
"sourcePaths": [ "${workspaceRoot}/src/main/java" ],
24+
"project": "TestApplication",
2325
"stopOnEntry": true,
2426
"hostName": "localhost",
2527
"port": "${JVMDebugPort}",
@@ -32,6 +34,7 @@
3234
"adapter": "vscode-javac",
3335
"configuration": {
3436
"request": "attach",
37+
"project": "TestApplication",
3538
"port": "${debugPort}",
3639
"sourceRoots": [
3740
"${workspaceRoot}/src/main/java"

support/test/java/test_project/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<artifactId>TestApplication</artifactId>
55
<version>1</version>
66
<properties>
7-
<maven.compiler.source>11</maven.compiler.source>
8-
<maven.compiler.target>11</maven.compiler.target>
7+
<maven.compiler.source>17</maven.compiler.source>
8+
<maven.compiler.target>17</maven.compiler.target>
99
</properties>
1010
</project>

0 commit comments

Comments
 (0)