Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# gdbgui release history

- start browser in a new thread to avoid connection errors

## 0.15.3.0
- Update default python version to 3.13

Expand Down
8 changes: 7 additions & 1 deletion gdbgui/server/server.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import socket
import threading
import webbrowser

from .constants import DEFAULT_HOST, DEFAULT_PORT, colorize
Expand Down Expand Up @@ -82,7 +83,12 @@ def run_server(
text = ("Opening gdbgui with %s at " + protocol + "%s:%d") % args
print(colorize(text))
b = webbrowser.get(browsername) if browsername else webbrowser
b.open(url_with_prefix)

# open the dashboard directly in a new tab/window in a new thread
def open_browser_func():
b.open_new_tab(url_with_prefix)

threading.Thread(target=open_browser_func).start()
else:
print(colorize(f"View gdbgui at {protocol}{url[0]}:{url[1]}"))
print(
Expand Down