小编Ben*_*lan的帖子

VSCode 调用堆栈变灰并充满(来源不明)

我正在尝试调试分段错误。我想我没有正确设置 VSCode。

这是我的 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": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/MidiEditor",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ]
        }
    ]
}
Run Code Online (Sandbox Code Playgroud)

这是我的调用堆栈:

libQt5Core.so.5!QString::operator=(QString const&) (Unknown Source:0)
MidiFile::populateInstruments() (Unknown Source:0)
MidiFile::MidiFile() (Unknown …
Run Code Online (Sandbox Code Playgroud)

visual-studio-code vscode-debugger

7
推荐指数
1
解决办法
3605
查看次数

尝试提交时出现奇怪的错误。[主题-空]

我在 CLI 中输入这个

git commit -m "Hello World!"
Run Code Online (Sandbox Code Playgroud)

这是我收到的错误消息

husky > commit-msg (node v14.15.3)
?   input: Hello World!
?   subject may not be empty [subject-empty]
?   type may not be empty [type-empty]

?   found 2 problems, 0 warnings
?   Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint

husky > commit-msg hook failed (add --no-verify to bypass)
Run Code Online (Sandbox Code Playgroud)

这是什么意思?

husky

5
推荐指数
4
解决办法
838
查看次数

终端无法在 Visual Studio Code 中打开

操作系统是Linux。

打开终端会产生此错误:

The terminal process failed to launch: Path to shell executable "bash" is not a file of a symlink.
Run Code Online (Sandbox Code Playgroud)

settings.json 和变量中的 bash 路径是正确的$PATH

这是 Visual Studio Code 版本 1.57.1​​。回滚到早期版本可以解决该问题,因此我做了一个错误报告。

visual-studio-code

3
推荐指数
1
解决办法
2503
查看次数

为什么0比0大(根据vscode调试器)?

第 7 行有一个等于 0 的变量 x。当我运行程序时,如果 x 不大于 0,它不应该前进到下一个缩进。但由于某种原因它确实如此。

0 > 0 为真

到底是怎么回事?

class MyProblem():
    def __init__(self):
        self.x = 5
    def recursive(self):
        self.x -= 1
        if self.x > 0:
            self.recursive()

p = MyProblem()
p.recursive()
Run Code Online (Sandbox Code Playgroud)

python math vscode-debugger

1
推荐指数
1
解决办法
91
查看次数