eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
20.02k stars 2.5k forks source link

Open a window for debug adapter #12561

Open meng-jpg opened 1 year ago

meng-jpg commented 1 year ago

Bug Description:

截屏2023-05-25 11 03 51

Steps to Reproduce:

1.start theia electron on windows 2.start debug with plugin cpp-tools 3.A window of the debug adapter will be opened.

Additional Information

meng-jpg commented 1 year ago

cpp-tools version: 1.8.4 launch.json:

{
        "name": "Debug cpptools",
        "type": "cppdbg",
        "request": "launch",
        "externalConsole": true,
        "program": "C:\\Users\\tptuser\\ZStudio\\TerapinesSolution\\project.exe",
        "args": [],
        "cwd": "C:\\Users\\tptuser\\ZStudio\\TerapinesSolution"
    }
vince-fugnitto commented 1 year ago

@meng-jpg thank you for reporting the issue, can you share the example workspace you tested against and confirm what the behavior is in vscode? Also note that vscode-cpptools is proprietary and cannot legally be used by non vscode products.

meng-jpg commented 1 year ago

It's a simply helloworld.c:

#include <stdio.h>

int main() {
    printf("hello\n");
    return 0;
}

We compiled the helloworld.c via gnu-gcc and debugged it via the cpptools extension with the launch.json above.

Also note that vscode-cpptools is proprietary and cannot legally be used by non vscode products.

Does it mean that we cannot provide the cpptools to our customers in our IDE as a builtin extension? In that condition, is there any other c/c++ extensions available since we develop a debugger adapter based on the lldb-vscode extension but it's only a debugger and dose not have some intelligent functionalities.

msujew commented 1 year ago

Does it mean that we cannot provide the cpptools to our customers in our IDE as a builtin extension?

Exactly, it cannot be (legally) used by any product outside of official microsoft products.

In that condition, is there any other c/c++ extensions available since we develop a debugger adapter based on the lldb-vscode extension but it's only a debugger and dose not have some intelligent functionalities.

Developers building Theia apps usually include the clangd extension instead for C/C++ support. For debugging, you can use the cdt-gdb-debugger extension.

meng-jpg commented 1 year ago

When we debugging in vscode via the same version of the cpptools:

截屏2023-05-26 17 01 02

The debugger created a window to print output since the externalConsole in the launch.json above is true. But Theia would create another window for the debug adapter binary of the extension.