dansomething / coc-java-debug

An extension for coc.nvim to enable Java debugging via jdt.ls
https://www.npmjs.com/package/coc-java-debug
Eclipse Public License 2.0
100 stars 8 forks source link

Vimspector doesnt stop at breakpoints #10

Closed binarydigitz01 closed 3 years ago

binarydigitz01 commented 3 years ago

I followed the exact steps on readme.md. I put some breakpoints and then when i connect to the remote host it just runs the code without stopping. here is my .vimspector.json: ` { "adapters": { "java-debug-server": { "name": "vscode-java", "port": "${AdapterPort}" } }, "configurations": { "Java Attach": { "default": true, "adapter": "java-debug-server", "configuration": { "request": "attach", "host": "127.0.0.1", "port": "5005" }, "breakpoints": { "exception": { "caught": "N", "uncaught": "N" } } } } }

` EDIT: I got it to work on maven project, But still cant cofigure it on a stand alone file.

binarydigitz01 commented 3 years ago

I finally got it to work by putting "stopAtEntry":true. Here is my updated .vimspector.json: { "adapters": { "java-debug-server": { "name": "vscode-java", "port": "${AdapterPort}" } }, "configurations": { "Java Attach": { "default": true, "adapter": "java-debug-server", "configuration": { "request": "attach", "host": "127.0.0.1", "port": "5005", "stopAtEntry": true }, "breakpoints": { "exception": { "caught": "N", "uncaught": "N" } } } } }

dansomething commented 3 years ago

That is strange. I'd expect it to stop at any breakpoint you set before running the debugger. If not, it is possibly a bug in Vimspector since this plugin only connects Vimspector to the running debug server in jdt.ls. Glad you found a workaround solution using "stopAtEntry": true.