Debug no response
When press ctrl+shift+p, select LeetCode Debugger: Start Debugging and run, no reaction. It does not generate any files in current directory, I have set delete temporay files to false.
Hi, could you share more context like what's your C++ dev env, and what code you was running the debug tool.
Sorry for replying so late.
I use this extension in windows11, my compiler is mingw g++, my code is just an empty leetcode problem.
I tried this in my local env (followed this to set up mingw g++), it works well for me.
You can try below steps:
- Make sure your local C++ env works: manually add main function into this leetcode problem file and debug/run it. If it works, then go next step.
- Run LeetCode debugger plugin with temporary file: I see your workspace already having these temporary files (though you mentioned "not generate any files"), you can go to "leetcode-main.cpp" which having the main function and debug/run it.
Also, one more possible issue is the you may need to add return 0; to function maxSumDivThree.
Sorry for replying so late. I use this extension in windows11, my compiler is mingw g++, my code is just an empty leetcode problem.
- Soryy, I repeat the steps in my newly created wsl, but it seems not work. In my root path, the template files are not generated when I
ctrl+shift+p. - After I delete the template files in my envrioments showed int the above image, I
ctrl+shift+pit does not work. - After I add main and head files, it can indeed be debugged.
- There might be some matter with my local environment. Later I will try in my another laptop.
It's a little bit confusing me on if the temporary files can be generated or not. Correct me if my understanding is wrong:
- You have 2 envs
- The first env is in Windows with mingw (shown as 1st pic), it CAN generate temporary files but can NOT start the debugging process
- Here is my comment: since it already generating temporary files, could you try to manully add
#include "leetcode-definition.h"to your1262.可被3整除的最大和.cppand then start VSCode debugging onleetcode-main.cppas it containingmainfunction so that we can know if the VSCode debugging is not working or the debugger can not trigger the VSCode debugging process.
- Here is my comment: since it already generating temporary files, could you try to manully add
- The second env is in WSL (show as 2nd pic), it can NOT generate temporary file
- Here is my comment: since it can not generate temporary file, there usually having some error message when you starting the debugger via
ctrl+shift+P, could you share the error message if possible. A possible reason is that the file name like1.两数之和is containing Chinese characters, you can try to set the value of conifgOutput File Encoding to "gbk".
- Here is my comment: since it can not generate temporary file, there usually having some error message when you starting the debugger via
- The first env is in Windows with mingw (shown as 1st pic), it CAN generate temporary files but can NOT start the debugging process
Both has no temporary files generated.
Have the same Fetch problem failed: Request connect error. in my another pc, Ubuntu 22.04, I just tried several minutes ago.
It means you have network issue, have you checked the config Source? Try to switch it to CN leetcode endpoint or just use local.
Ok, it works well after I switch the Source to local. 😂
Thank you for your help.
