Bing Zhao
Bing Zhao

Reputation: 608

How to continue using gdb to debug c++ code after reconnecting to remote Ubuntu machine using ssh?

My local machine is of Windows 10 and I have a bad network condition.

So when I ssh to log in remote Ubuntu machine, and try to debug using gdb, which costs perhaps 30 minutes to the breakpoint, I often get connection close error.

And when I ssh again, I have to start over.

Is there a recoverable function of gdb so that I can continue using it after reconnecting?

Upvotes: 1

Views: 102

Answers (1)

Employed Russian
Employed Russian

Reputation: 213957

Is there a recoverable function of gdb so that I can continue using it after reconnecting?

No.

You need to use a program designed to keep your session alive: tmux or screen. Spending time learning to use them well now will pay for itself many times over.

Upvotes: 1

Related Questions