Getting started with Theia and C #38
Replies: 3 comments 1 reply
-
Thank you for exploring CDT Cloud Blueprint! Did you configure or create a launch configuration in {
"version": "2.0.0",
"configurations": [
{
"type": "gdb",
"request": "launch",
"name": "Debug Example C++ (hello-world)",
"program": "${workspaceFolder}/hello-world/Example",
"initCommands": [
"tbreak main"
],
"preLaunchTask": "Binary build (hello-world)"
}
]
} Also I see that you have installed a number of additional extensions. Which did you install? If you go to https://try.theia-cloud.io/, login via Github user and select CDT Cloud Blueprint in the dropbox in the bottom, the process should look as follows: Thank you! |
Beta Was this translation helpful? Give feedback.
-
@planger Thanks and sorry for the delay in getting back on this. I do have a launch config I created from the dropdown at the top of the debug pane using 'Add configuration...'. I selected 'GDB CDT Local debugging'. Here's what I ended up with:
Here's what my program looks like: Based on your launch config, I changed mine as follows:
Tried debugging again and this time received the following error message:
Which made me realize I don't recall how I actually build this program. How does that happen? I then watched the video at the link above and tried CDT.Cloud Blueprint. When I used the command palette to select the example, this is what I see: I tried getting the CMake example in my local Theia deployment, but I don't see it as an option. What extension brings it in? Here's what I currently have: |
Beta Was this translation helpful? Give feedback.
-
@planger Thanks! I tried the command to generate the CMake example, but I don't seem to have it on my command palette. I started fresh with a new folder and my hello-world.c program. I then used the 'Run File' link from the drop down in the upper right corner: This resulted in an error and apparently a build executed: I then used the 'Run File' link again from the drop down to run the program. This seemed to work: Now, with a breakpoint set, I tried debugging, but no luck: It feels like the debugger is unable to connect to running program, like I'm missing a connection definition someplace. BTW, I checked my |
Beta Was this translation helpful? Give feedback.
-
Let me preface this with, I haven't done C coding since my undergraduate days many, many years ago. I'm attempting to get started with C coding in Theia, on OSX. I tried searching for a getting started article, but didn't find anything (for using Theia vs. building on Theia).
I'm using this simple 'hello world' program.
I soon realized I needed gdb. I got that set up with help from this article and verified with
gdb --version
.After poking around a bit, I ended up with the following workflow after creating
hello-world.c
:hello-world.c
.Task:Build
terminal windowI'm sure I'm missing something, I just can't seem to determine what that is.
Beta Was this translation helpful? Give feedback.
All reactions