Closed JerryNixon closed 7 years ago
@JerryNixon There actually are configuration nobs already. In launch.json, see the various logging
options.
Are there, @gregg-miskelly? Please, help me understand.
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}\\bin\\Debug\\netcoreapp1.0\\test.dll",
"args": [],
"cwd": "${workspaceRoot}",
"externalConsole": false,
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command.pickProcess}"
}
]
}
Yes, example:
...
"internalConsoleOptions": "openOnSessionStart",
"logging": {
"moduleLoad": false
}
Let us know if you want more nobs.
Ah, okay with these settings (just repeating in case another developer finds this thread):
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}\\bin\\Debug\\netcoreapp1.0\\test.dll",
"args": [],
"cwd": "${workspaceRoot}",
"externalConsole": false,
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart",
"logging":
{
"moduleLoad": false,
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command.pickProcess}"
}
]
}
The output is simply:
--------------------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (clrdbg) with Visual Studio
Code, Visual Studio or Visual Studio for Mac software to help you develop and
test your applications.
--------------------------------------------------------------------------------
Hello World!
The program 'c:\TEMP\test\bin\Debug\netcoreapp1.0\test.dll' has exited with code 0 (0x00000000).
Which is so much better. It turns out the feature that is already built-in is very sufficient. Before I close this issue, one last question. Is there a nob to hide that You may only...
preamble?
I wonder why this isn't the default. I mean that seriously.
@JerryNixon because when things go wrong you will never figure out why if you turn that off :)
@JerryNixon sorry, missed your question about the preamble - no, we don't have an option for that.
Why is this preamble useful for? Is there only @JerryNixon and me thinking it should not be there?
In case someone's looking how to hide this preamble, you need to edit vsdbg.dll
at %USERPROFILE%\.vscode\extensions\ms-vscode.csharp-1.14.0\.debugger
with a HEX editor and replace this message.
My vsdbg.dll
's hash is 4b82f8051f1f4c9692fb29804df8835c
(MD5) / 1b16b52c3a3079e2e875e8a1a7c4890e220f21ac
(SHA1) and the message starts at 0x00091F40
and ends at 0x0009207A
. Just replace it with NUL
s (00).
My modified DLL is attached here in case someone needs. vsdbg.zip
The preamble is really irritating and a terrible place to put it. If it's just legalese to placate legal then they should put it somewhere that doesn't impede on productivity.
Having anything except application output in your debug console is just tacky.
Also its semi nonsensical/ tautological ... what else are we going to use the .NET Core Debugger for .. I mean we are literally using it to test our applications in that piece of software when we get told we are only supposed to be using it to do just that.
Part of the reason it's so irritating is its stupidity.
Do I want all this output in the debug window? Yes, sometimes. But most of the time - which means 99% of the time - it's crazy overwhelming and meaningless. It would be ideal if I could dial down the volume of output unless I need it to debug something. Could this be configurable?