Visual Studio代码 - 调试 [英] Visual Studio Code - Debugging

查看:254
本文介绍了Visual Studio代码 - 调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了Visual Studio代码,但是我不知道如何配置调试器。



我正在学习编程,我不知道如何配置有人帮我解决这个问题吗?



这是你需要配置的。 >




  {
version:0.1.0,
//配置列表添加新配置或编辑现有配置。
//仅支持节点和单声道,更改类型才能切换。
配置:[
{
//配置名称;出现在启动配置下拉菜单中。
name:启动app.js,
//配置类型。可能的值:节点,单声道。
type:node,
//工作区相对或程序的绝对路径。
程序:app.js,
//启动后自动停止程序。
stopOnEntry:true,
//传递给程序的命令行参数。
args:[],
//正在调试的程序的工作目录的工作空间相对或绝对路径。默认是当前工作区。
cwd:。,
//要使用的运行时可执行文件的工作区相对或绝对路径。默认是PATH上的运行时可执行文件。
runtimeExecutable:null,
//传递给程序的环境变量。
env:{}
},
{
name:Attach,
type:node,
/ / TCP / IP地址。默认为localhost。
address:localhost,
//要附加的端口。
port:5858
}
]
}


解决方案

您需要更具体地解决您的问题。



您正在调试什么样的代码?

现在,Visual Studio代码对所有平台上的Node.js(JavaScript和TypeScript)进行了调试支持,对OS X和Linux上的mono(C#和F#)的实验性支持以及即将推出的ASP .NET 5。



如果您正在使用其中之一,您应该可以开始使用调试功能。



有关详细信息,请直接链接到官方调试文档: https://code.visualstudio。 com /文件/调试


I downloaded the Visual Studio Code, but I don't know how to configure the debugger.

I am learning programming and i don't know how to configure it?

someone help me with this problem?

This is what you need to configure.


{
"version": "0.1.0",
// List of configurations. Add new configurations or edit existing ones.  
// ONLY "node" and "mono" are supported, change "type" to switch.
"configurations": [
    {
        // Name of configuration; appears in the launch configuration drop down menu.
        "name": "Launch app.js",
        // Type of configuration. Possible values: "node", "mono".
        "type": "node",
        // Workspace relative or absolute path to the program.
        "program": "app.js",
        // Automatically stop program after launch.
        "stopOnEntry": true,
        // Command line arguments passed to the program.
        "args": [],
        // Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
        "cwd": ".",
        // Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
        "runtimeExecutable": null,
        // Environment variables passed to the program.
        "env": { }
    }, 
    {
        "name": "Attach",
        "type": "node",
        // TCP/IP address. Default is "localhost".
        "address": "localhost",
        // Port to attach to.
        "port": 5858
    }
]
}

解决方案

You need to be more specific with your question.

What kind of code are you debugging?

Right now Visual Studio Code has debugging support for Node.js (JavaScript and TypeScript) on all platforms, experimental support for mono (C# and F#) on OS X and Linux, and soon ASP.NET 5.

If you are using one of those, you should be able to start using debugging features.

For more information, here is a direct link to the official debugging documentation: https://code.visualstudio.com/Docs/debugging

这篇关于Visual Studio代码 - 调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆