我正在尝试在 VSCode 中运行 C 程序。我正在努力获取有效的 launch.json 文件,但它抱怨该"type": "cppvsdbg"行,说“已安装配置的调试类型‘cppvsdbg’,但在此环境中不受支持”。
我尝试根据 VSCode 网站重新开始和调试,但他们让我使用一个"type": "cppdbg"选项,该选项对我不起作用,因为它不允许像"console". 我也尝试在这个错误中搜索关键字,但只能找到使用不同语言(主要是Python)的类似帖子。所以我们来了!
我正在使用 M1 Max 芯片运行 Mac OS Monterey 12.6。我的 VSCode 版本是最新的“1.71.0(通用)”。
我安装了bun.js vs code 插件,并使用提供的配置成功调试了打字稿文件。如果我设置,还可以调试一个测试文件program:${file}
但没有 launch.json 示例如何调试或仅运行所有测试
我正在使用的配置,断点并不总是有效,但到目前为止还可以
{
"type": "bun",
"request": "launch",
"name": "Debug Bun",
"program": "${file}",// just open *.test.ts file and this line will allow you to debug current test file
"args": [],
"cwd": "${workspaceFolder}",
"env": {},
"strictEnv": false,
"watchMode": false,
"stopOnEntry": false,
"noDebug": false,
"runtime": "bun",
},
Run Code Online (Sandbox Code Playgroud)
让测试资源管理器以某种方式与bun一起工作也会很酷如果有人知道如何添加热键来重新启动以前的测试,那将有很大帮助
每次我在VSCode中构建或运行程序时,都会加载一个新的python调试控制台。在我知道之前,我有20岁以上,需要开始删除它们。打开32个控制台后,出现错误“终端进程终止,退出代码:256”。我最近将终端从默认控制台更改为git bash。我该如何阻止呢?
我正在 VSCode 中使用 Java Springboot (2.1.2) 应用程序。我有调试器工作并且可以运行应用程序。但是,我在向 run 命令添加 Spring 特定参数时遇到了困难。我环顾四周,但似乎无法找到任何关于此的信息。
我试图告诉 spring 使用两个 application.yml 文件。我将在命令行中用于实际运行应用程序的代码是:
mvn spring-boot:run \
-Dspring.config.location=classpath:/application.yml,classpath:/application-secret.yml
我希望能够将此参数添加到 vscode launch.json 文件中。
我当前的启动文件看起来像这样,但我尝试了很多不同的变体。
{"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug Blog Rest",
"request": "launch",
"mainClass": "com.example.BlogRestApplication",
"args": [
"-Dspring.config.location=classpath:/application.yml,classpath:/application-secret.yml"
]
}
]}
Run Code Online (Sandbox Code Playgroud) 我最近使用 VS 代码通过使用命令行标志从命令行打开来打开一个大文件--max-memory=12288mb。我能够很好地编辑文件并完成我需要做的事情,然后正常关闭代码。
默认情况下,我启用了restoreWindows和hotExit设置,因此当我重新打开代码时,所有以前的文件都已启用。
此后,每当我通过快捷方式或上下文菜单打开 VS Code 时,它都会尝试重新打开大文件并在启动后约 10 秒内崩溃。并显示警告:
窗户坏了
对此造成的不便,我们表示歉意!您可以重新打开窗口以从上次中断的地方继续
我尝试了几个步骤来尝试在 10 秒内关闭/阻止文件重新打开:
Close Editor,Close Folder和Close Window选项"window.restoreWindows": "none"并"files.hotExit": "off"尝试阻止文件自动重新加载我也试过在禁用扩展的情况下运行 VS Code
我是 DotnetCore 和 MS 编程的新手。随着 MS 对平台中立性的新推动,我有兴趣尝试一下,看看它是否像它承诺的那样工作。也就是说,我什至无法从 VSCode 在 Windows 上的 DotNetCore 上运行 helloworld 程序。在我的命令提示符和 VisualStudio 2019(我的 mac 的 VS Studio for mac)上,一切似乎都运行良好。真正的压力似乎在 Windows 10 中的 VSCode 上。如果可以,我将不胜感激
我收到的错误是“找不到 coreclr 类型的调试适配器”。不管我做什么,我最终都会遇到这个错误。1. 安装 Dotnet core 3.0 2. 设置指向 C:\Program Files\dotnet\sdk\3.0.100\Sdks 的 MSBuildSDKsPath 环境变量 3. 多次重启机器
什么都行不通。这是示例代码以及我的launch.json。
using System;
namespace OOPExample
{
public struct Dimensions {
public double Length { get; }
public double Width { get; }
public Dimensions(double length, double width) {
Length = length;
Width= width;
}
public double …Run Code Online (Sandbox Code Playgroud) 我试图在Mac上使用VSCode开发的C代码上使断点起作用。
我的代码似乎可以编译并运行良好(由于vscode BTW 上没有'openssl / crypto.h'文件),但是我没有得到任何断点,甚至在开始使用"stopAtEntry": true或附加到正在运行的进程时也没有。
我的tasks.json和launch.json非常标准:
{
"tasks": [
{
"type": "shell",
"label": "clang build active file",
"command": "/usr/bin/clang",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}",
"-I/usr/local/opt/openssl/include",
"-L/usr/local/opt/openssl/lib",
"-lssl",
"-lcrypto"
],
"options": {
"cwd": "/usr/bin"
}
}
],
"version": "2.0.0"
}
Run Code Online (Sandbox Code Playgroud)
和:
{
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) Attach",
"type": "cppdbg",
"request": "attach",
"program": "${workspaceFolder}/test2",
"processId": "${command:pickProcess}",
"MIMode": "lldb"
},
{
"name": "clang build and debug active file",
"type": …Run Code Online (Sandbox Code Playgroud) 我正在尝试在 MacOS 上使用 VS 代码调试以下 try C++ 程序。它需要用户的输入。它只是将两个数字作为输入并返回一个数字列表作为输出的东西。这是我的launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/hello",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "lldb"
}
]
}
Run Code Online (Sandbox Code Playgroud)
当我按 F5 时,确实启动了一个外部终端窗口,但它不执行输出文件“hello”,它只是在我的主文件夹中显示常规提示〜。如果我只是正常运行文件,一切都会正常运行。我将发布我正在尝试调试的确切代码作为示例,因为它足够简单。
#include <iostream>
using namespace std;
class Calculator
{
private:
/* data */
public:
Calculator(/* args */) {} …Run Code Online (Sandbox Code Playgroud) 我正在使用 VS code v1.45 来调试一个简单的 nodejs 文件。
我正在测试一个简单的 node.js 文件。
var msg = 'Hello World';
console.log(msg);
Run Code Online (Sandbox Code Playgroud)
当我按 F5 时,系统会提示我选择环境。请参阅下面的屏幕截图。
这很麻烦。如何让VS代码默认选择Node.js环境而不提示?
我的 node.js 安装在 C:\Program Files\nodejs\node.exe
javascript node.js visual-studio-code vscode-settings vscode-debugger
是否可以配置 Visual Studio Code(安装在我的 Windows 10 客户端机器上)来运行和调试位于服务器端路径C:\inetpub\wwwroot\dir\dev 中的ColdFusion 代码?
我在该Windows Server 2012 R2 Standard机器上使用ColdFusion 2016(64 位)和IIS 6.2。
我在 Visual Studio Code 的“资源管理器”中打开目录\\my-cold-fusion-server-as-FQDN\c$\inetpub\wwwroot\dir\dev来显示和修改 cfm 文件。
我还在Visual Studio Code(“运行”>“打开配置”)中配置了launch.json文件,如下所示:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://my-cold-fusion-server-as-FQDN/dir/dev", …Run Code Online (Sandbox Code Playgroud) coldfusion visual-studio-code coldfusion-2016 vscode-debugger
vscode-debugger ×10
.net-core ×1
bun ×1
c ×1
c# ×1
c++ ×1
coldfusion ×1
java ×1
javascript ×1
launch ×1
macos ×1
node.js ×1
spring ×1
spring-boot ×1
xcode11 ×1