yiGmMk / comment_blog

the comments of www_programnotes_cn
0 stars 0 forks source link

vscode,java debug extension config and usage for single source file | 编程笔记 #95

Open yiGmMk opened 1 year ago

yiGmMk commented 1 year ago

https://programnotes.cn/vscode-java-debug-2/index.html

刚开始使用vscode+java时遇到这个问题,Could not find or load main class x,将源文件加入”Java source paths”并修改文件名与主类名相同后解决了.这样就能方便地调试运行单个java文件了 新的问题 但是由于”Run|Debug”这两个快捷按钮每次会根据类名生成配置并写入launch.json,且当主类名相同时调试运行的程序会出错(不是当前文