Voila! If you did everything right, you should have stopped at the breakpoint, and have the stack / local variables visible to you.Go to the debug panel on the left, and it should say Attach to Pintos with a green Run button beside it. ![]() What setting a breakpoint looks like in VSCode To do this, open the file in VSCode, hover your mouse on the left of the line number till you see a red circle show, and then click it to set the breakpoint. Then, set a breakpoint somewhere, say in src/threads/init.c at line 96.Pintos -gdb -v -k -T 60 -bochs -q run alarm-single Modify the values here based on the example below (which is set up to debug using src/threads/build/kernel.o): In the Run menu on the top, click Add Configuration.Install the Native Debug extension (while inside the container).Attach VSCode to the container, go into your source folder (here I assume the pintos root).I recommend installing the C/C++ extension at least for a good dev experience.This is usually not possible if VSCode itself is not hooked into the container. All integrated terminals should now directly open inside the container, and you can even do stuff like code file.c from the terminal to open it up in the editor. ![]() ![]() Verify this by looking at the bottom left of the opened window, it should say Container pintos. This should open up VSCode inside the container.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |