简体   繁体   English

如何在 VSCode 内的终端中调试 c 代码?

[英]How can I debugg c code in the terminal inside VSCode?

I've installed the VSCode in my mac (Big Sur) and I can not run code inside VSC's terminal.我已经在我的 mac (Big Sur) 中安装了 VSCode,但我无法在 VSC 的终端中运行代码。 I've searched online and I've tried some things but I didn't found any error like mine.我在网上搜索并尝试了一些方法,但没有发现像我这样的错误。 Is that supposed that everytime I try to debugg my code it appears like a pop-up asking for permission of my desk's files?这是否假设每次我尝试调试我的代码时,它看起来就像一个弹出窗口,要求我的办公桌文件的许可? ( pop-up ) 弹出

It should show the message "Hello World."它应该显示消息“Hello World”。 and it doesn't do anything.它什么也没做。 ( Image 1 ) 图1

I've tried to put "//" before ""console": "externalTerminal"," because it showed an error but it continues not working.我试图将“//”放在“控制台”之前:“外部终端”,因为它显示了一个错误,但它仍然无法正常工作。 ( Image 2 ) 图二

If someone could help me I would be very appreciated:)如果有人可以帮助我,我将不胜感激:)

Try locating your.exe directly尝试直接定位 your.exe

something like this:像这样的东西:

 "program": "${workspaceFolder}\\directory\\file.exe"

I think this should work我认为这应该有效

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM