Click here to Skip to main content
15,558,870 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi
I'm writing a C++ app for Linux in windows environment.
I can debug fine, but when an exception occurs or when stepping the last line of main function, VS freezes. to make the VS responsive again, I kill its connection.
now, I don't know if its GDB's fault or VS's.
any tips on how can i resolve this issue?

What I have tried:

reinstalling GDB
different versions of GDB
uninstalling all additional VS plugins
Posted
Comments
Member 15627495 4-Sep-22 3:31am    
hello,

It's hard to help because you don't give enough information.

It's a freeze or a crash ?
do you have in your code an 'infinity loop' ?


VS , by faulty code , can stay inoperant.
do you have a 'error report' with this freeze ?

If you compile on your local computer, then bring on the linux your app, do you have this bug ?
reverser69 4-Sep-22 5:50am    
as I said, it freezes. when I kill the connection, VS becomes responsive again after showing "GDB error". there is no error as VS pops up a notification "VS is busy doing something". I didn't understand your last sentence thoroughly; do mean i try debugging my app in Linux? if so, I must use VS code which changes the whole situation.
Member 15627495 4-Sep-22 10:22am    
the freeze could come from the Main Thread, by a huge operation, the GUI doesn't respond.
It's normal.
you can wait for the end of the work, or add 'Thread' or 'task' to compute.
a second Thread will unlock your GUI.

a Thread have a limited space to work, ram, handles, CPU use...
but you can add Thread to operate, and see your GUI unlock ( when the second Thread is working ).

A busy single Thread leads to a GUI lock ( just wait... )

Is your script operating a big amount of datas ?

you know you can add a bit of code here, to help the helpers, It's a hard time with a little of information



the GBD error is which type of error ?

is your App using remote resources, that could explain why your app reborn when you disconnect.
reverser69 5-Sep-22 2:01am    
I'm 99% sure that its not code related. even a simple exception raising act will cause the debug to hang; accessing out of bound array index or stepping out of main() also freezes the VS. i think the only way to help the helper is give them VS and GDB logs. any tips on where those logs are?
reverser69 7-Sep-22 1:12am    
so, i added older repositories to my source.list and i could install "9.1-0ubuntu1" version of GDB. now i don't have any problems. i don't know whether this problem is from my side or its bug and i should report it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900