mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
HackStudio: Add ability to attach debugger to a running process
This commit is contained in:
parent
eb16513165
commit
ff6fb2cb10
Notes:
sideshowbarker
2024-07-16 23:50:09 +09:00
Author: https://github.com/itamar8910
Commit: ff6fb2cb10
Pull-request: https://github.com/SerenityOS/serenity/pull/17544
4 changed files with 52 additions and 12 deletions
|
@ -1878,6 +1878,21 @@ void HackStudioWidget::open_coredump(DeprecatedString const& coredump_path)
|
|||
}
|
||||
}
|
||||
|
||||
void HackStudioWidget::debug_process(pid_t pid)
|
||||
{
|
||||
open_project("/usr/src/serenity");
|
||||
Debugger::the().set_pid_to_attach(pid);
|
||||
|
||||
m_debugger_thread = Threading::Thread::construct(Debugger::start_static);
|
||||
m_debugger_thread->start();
|
||||
m_stop_action->set_enabled(true);
|
||||
m_run_action->set_enabled(false);
|
||||
|
||||
for (auto& editor_wrapper : m_all_editor_wrappers) {
|
||||
editor_wrapper.set_debug_mode(true);
|
||||
}
|
||||
}
|
||||
|
||||
void HackStudioWidget::for_each_open_file(Function<void(ProjectFile const&)> func)
|
||||
{
|
||||
for (auto& open_file : m_open_files) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue