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

Debug Adapter: Console Output should have the "console" category as per specifications #89279

Closed
dekaravanhoc opened this issue Mar 8, 2024 · 3 comments · Fixed by #89475
Closed

Comments

@dekaravanhoc
Copy link

Tested versions

Godot v4.2.2.rc1

System information

Godot v4.2.2.rc1 - Windows 10.0.22631 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 4070 (NVIDIA; 31.0.15.3640) - AMD Ryzen 7 3700X 8-Core Processor (16 Threads)

Issue description

At the moment console output is marked as stdoud (All console output including printerr etc.). Thats probably not completly wrong, but there is an explicit "console" category for this, which is also the default, if no category is given. https://microsoft.github.io/debug-adapter-protocol/specification#Events_Output

[ DEBUG ] 2024-03-08T12:06:48Z+0100 ] ...ppData/Local/nvim-data/lazy/nvim-dap/lua/dap/session.lua:951 ]	1	{
  body = {
    category = "stdout",
    output = "Loaded system CA certificates\r\n"
  },
  event = "output",
  seq = 7,
  type = "event"
}

i.e. nvim-dap outputs "console" output to the console and "stdout" output to its REPL interface.
I would expect all console output from Godot to be category "console".

Steps to reproduce

Debug a game and look into the logs of your debug client or the output stream of the debug adapter.

Minimal reproduction project (MRP)

N/A

@akien-mga
Copy link
Member

CC @rsubtil

@rsubtil
Copy link
Contributor

rsubtil commented Mar 8, 2024

I'm not sure about this one. The spec states that the console category should be used for any output from the debugger (Godot editor), and not the debuggee (the process being debugged):

* 'console': Show the output in the client's default message UI, e.g. a
* 'debug console'. This category should only be used for informational
* output from the debugger (as opposed to the debuggee).

Currently all output events are generated from the debuggee, and the editor does not generate any output itself:

debugger_node->get_default_debugger()->connect("output", callable_mp(this, &DebugAdapterProtocol::on_debug_output));

@dekaravanhoc
Copy link
Author

Ah yeah ok. Reading comprehension... :) You are correct.
But stderr (like printerr()) output should than be marked as such or not?

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

Successfully merging a pull request may close this issue.

4 participants