Example of launch configuration
cambordas opened this issue · 2 comments
I have been having trouble trying to find out the corresponding launch configurations specific for coc-java-vimspector.
The project works when debugging regular java class without arguments. However, it is not written in the documentation how to provide arguments for debugging with this .
It mentions a launch.json, which I assume, comes from the VSCode extension. On the other hand vimspector uses its own json. Because of these differences, it is not obvious which one to use/modify.
Could you provide a "default" configuration or mention the name of the file that coc-java-vimspector will parse by default?
Thanks you
After start once, use :CocOpenLog open coc.nvim log and search 'debugConfig' will see the configuration actually send to vimspector through vimspector#LaunchWithConfigurations( debugConfig ).
If you want to modify or add some args, there are two ways. One use :CocConfig open the globally config and add launch.configurantions. The other add config file coc-settings.json to your project /projectRoot/.vim/coc-settings.json.
Example:
"launch.configurations": [{
"mainClass":"HelloWorld",
"request": "launch",
"args":[1,2]
}]
I hope this would be useful for you.
Yes, it actually helped me a lot. My problem is that I am used to configure my adapters through the .vimspector.json and not through the coc-settings.json file. For that reason, I was not understanding properly where to change the settings/ add the args. But now is working! I will try to tweak it on my own my launch it through vimspector#launch without.
Thanks!