当前位置:   article > 正文

vscode调试时如何在launch.json中添加环境变量_launch.json environment

launch.json environment
  1. "configurations": [
  2. {
  3. "name": "g++ - 生成和调试活动文件",
  4. "type": "cppdbg",
  5. "request": "launch",
  6. "program": "************************",
  7. "args": ["**************************"],
  8. "stopAtEntry": false,
  9. "cwd": "*****************************",
  10. "environment": [{"name": "PYTHONPATH", "value": "/home/hl/code/DeConvV2/"}],
  11. "externalConsole": false,
  12. "MIMode": "gdb",
  13. "setupCommands": [
  14. {
  15. "description": "为 gdb 启用整齐打印",
  16. "text": "-enable-pretty-printing",
  17. "ignoreFailures": true
  18. }
  19. ],
  20. "preLaunchTask": "C/C++: g++ build active file",
  21. "miDebuggerPath": "/usr/bin/gdb"
  22. }
  23. ]

更多常用参数的解释和示例,参考

vscode调试时几个常用参数的含义和设置总结_子燕若水的博客-CSDN博客request#指示配置节是要启动程序还是要连接到已在运行的实例。Indicates whether the configuration section is intended tolaunchthe program orattachto an already running instance.args#启动程序时传递给程序的命令行参数的JSON数组。JSON array of command-line arguments to pass to the program whe...https://blog.csdn.net/u010087338/article/details/121282932 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/547595
推荐阅读
相关标签
  

闽ICP备14008679号