Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable some debug console messages #5861

Closed
maidamai0 opened this issue Jul 30, 2020 · 6 comments
Closed

disable some debug console messages #5861

maidamai0 opened this issue Jul 30, 2020 · 6 comments
Assignees

Comments

@maidamai0
Copy link

maidamai0 commented Jul 30, 2020

Type: Debugger

Describe the bug

  • OS and Version: Windows 10 2004
  • VS Code Version:1.47.3
  • C/C++ Extension Version: 0.29.0
  • A clear and concise description of what the bug is.

How do disable messages with the yellow color such as the one about pdb and 'thread'
I find these messages very annoying and mixed with my console output sometimes.

-------------------------------------------------------------------
You may only use the C/C++ Extension for Visual Studio Code with
Visual Studio Code, Visual Studio or Visual Studio for Mac software
to help you develop and test your applications.
-------------------------------------------------------------------
Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\msvcp140d.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\vcruntime140d.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\vcruntime140_1d.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\ucrtbased.dll'. Cannot find or open the PDB file.
The thread 21764 has exited with code 0 (0x0).
...
Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file.
The thread 19156 has exited with code 0 (0x0).
The thread 15344 has exited with code 0 (0x0).
The program '[2112] json_message.exe' has exited with code 0 (0x0).

To Reproduce

  • Code sample
#include <iostream>
int main() {
std::cout << "hello world!" << std::endl;
}
  • Steps to reproduce the behavior:
    compile and run in vs code.
@WardenGnaw
Copy link
Member

You can disable these outputs by adding a logging block into your launch.json and disable moduleLoad and threadExit. See the package.json for more information.

@maidamai0
Copy link
Author

Thanks! No module loaded logs anymore.
But I still get thread and program exit log with threadExit and processExit disabled.

{
    "name": "(Windows) Launch",
    "type": "cppvsdbg",
    "request": "launch",
    "program": "${command:cmake.launchTargetPath}",
    "args": [],
    "stopAtEntry": false,
    "cwd": "${workspaceFolder}",
    "environment": [],
    "externalConsole": false,
    "logging": {
        "moduleLoad": false,
        "threadExit": false,
        "processExit": false
    }
}

Gives:

-------------------------------------------------------------------
You may only use the C/C++ Extension for Visual Studio Code with
Visual Studio Code, Visual Studio or Visual Studio for Mac software
to help you develop and test your applications.
-------------------------------------------------------------------
The thread 23004 has exited with code 0 (0x0).
... program output
The thread 12584 has exited with code 0 (0x0).
... program output
The thread 8184 has exited with code 0 (0x0).
... program output
The program '[18604] json_message.exe' has exited with code 0 (0x0).

@WardenGnaw
Copy link
Member

The thread and process exit messages logging is available in v1.1.0.

This should be in the vsdbg version 16.4.202272. You can find this at %USERPROFILE%\.vscode\extensions\ms-vscode.cpptools-1.1.1\debugAdapters\vsdbg\bin\vsdbg.exe

@Phyyl
Copy link

Phyyl commented Nov 28, 2021

This works really well but there's still this message at the top:

You may only use the C/C++ Extension for Visual Studio Code with
Visual Studio Code, Visual Studio or Visual Studio for Mac software
to help you develop and test your applications.
-------------------------------------------------------------------

Is there a setting I can turn on to disable printing this?

@anirugu
Copy link

anirugu commented Sep 29, 2022

@WardenGnaw

I am able to hide moduleLoad message and others but I am still seeing the first 3 lines. Is there a way to hide it?

image

@bobbrow
Copy link
Member

bobbrow commented Sep 29, 2022

@anirugu, @Phyyl, no there is no setting to disable that message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants