在调试时,VSCODE调试器并不总是显示本地变量。我停止,重复或尝试再次调试后停止
背景:我是一名大学学生,几周前学会了如何使用调试器,主要使用 Java/Python 编写代码。还没有框架。
问题: 我的 vscode bugger 遇到问题已经有一段时间了,似乎没有人知道答案,但要点是:当我第一次启动 vscode 调试时,我的调试器不会显示局部变量。我尝试了我找到的所有相关可能的解决方案,甚至去找了我的教授,但即使他们也不知道。我做错了什么吗?我该如何解决这个问题?请帮忙。
我尝试的主要内容是:
- 尝试了不同的选项来运行调试器(F5,通过“运行和调试”部分运行等)
- 每次需要调试时都重新启动 vscode。
- 每次都终止终端和调试会话。
- 无奈之下,只好打印了。
我对编程还是个新手,所以我希望这只是我的一个错误,我不需要转移到不同的 IDE,因为我真的很喜欢 vscode。
Context: I am a student in university that learned how to use debugger a few weeks ago and primarily code in Java/Python. No frameworks yet.
Problem:
I have had a problem with my vscode bugger for quite a while and no one seems to know the answer but the gist is: my debugger won't show local variables when I debug the first time vscode is booted up. I tried all the relevant possible solutions I found and even went to my professor but even they don't know. Am I doing something wrong? How can I fix this? Please help.
Main things I tried are:
- Tried different options to run the debugger (F5, running through "Run and debug" section, etc.)
- Rebooting vscode every time I needed to debug.
- Killing terminal and debug session each time.
- Out of desperation, just printing.
I still am new to programming, so I hope its just an error on my part and that I don't need to move to a different IDE since I really like vscode.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我无法重现您的问题,但是您可以尝试通过
java的命令清除缓存:清洁Java语言服务器工作区
在命令调色板( ctrl+shift+shift+shift+)。如果它不起作用,您可以尝试重新安装Java 扩展程序的调试器,如果它仍然不起作用,则可以尝试安装旧版本的Java
扩展程序。I can not reproduce your problem, but you can try to clear the cache through the command of
Java:clean Java Language Server Workspace
in the Command Palette(shortcut of Ctrl+Shift+`). If it does not work you can try to reinstall theDebugger for Java
extension, if it still does not work you can try to install the older version ofDebugger for Java
extension.