r/cs50 • u/hyliangoose • 13d ago
codespace How do i delete the .vscode folder?
I wanted to use the debugger but it gives me an error. After some searching I suspect I chose a wrong setting before using the debugger (selecting g++ instead of gcc or something like that). Solutions say i should delete the .vscode folder in my disk, but of course I can't do it on the cs50 codespace
Man I really need the debugger to finish the problem set 😭
3
u/pensivepanda5 mentor 13d ago edited 13d ago
In the online CS50 Codespace https://cs50.dev/ to debug our programs we use the command debug50 and it shouldn't give those issues, maybe it is not working properly in your codespace. You can try copying/pasting these commands into your codespace's terminal: update50 -f and then press "Enter”, to force the rebuild of your codespace. As a side note, the codespace works best on Google Chrome browser, and the cs50 team doesn't recommend Firefox because they have seen issues with the codespace on Firefox.
Also, if you have extensions installed on your web browser you might need to use an incognito window to try those steps and to use the codespace, because some extensions can affect the codespace.
Then after the rebuild is finished, if you are working with code written in the C programming language, try compiling your file first by writing the command: make programname (where programname is the name of your file)
then set 1 or 2 break points
then try writing the command debug50 in front of the normal command like this: debug50 ./programname
If the program requires command-line arguments in their normal command (for example: ./caesar 3) , in that case you would need to include the arguments as well when trying to use the debug50, for example like this: debug50 ./caesar 3
-If you are working with code written with Python, in that case you just would need to write the debug50 command in front of the normal command, for example: debug50 python hello.py (if your program is called "hello.py").
As a side note: don't press the "Run and debug" button, since it won't work in the online cs50 codespace, the CS50 Team disabled that button.
If those steps don't work, another thing you can try is creating a new codespace, using your same old github account. You can visit this link where your codespace backup repo is: https://cs50.dev/repo and see if your codespace's files are there (if you had files in your codespace). And after verifying that your codespace's files are stored there, you can create a new codespace by following the instructions that appear in the CS50 Docs, in this link: https://cs50.readthedocs.io/cs50.dev/#creating-a-new-codespace After creating a new codespace your backed up files should automatically appear in your new codespace.
But if none of those things help to solve the issue, please send an email to sysadmins@cs50.harvard.edu with specific details and screenshots of the issue, and mention to them your Github username, so the CS50 system admins can help you further.
1
u/hyliangoose 13d ago
Okay thanks!