gsmcmullin / atom-gdb-debugger Goto Github PK
View Code? Open in Web Editor NEWGDB integration for Atom
License: GNU General Public License v3.0
GDB integration for Atom
License: GNU General Public License v3.0
If possible, add so one can set the font of the GDB terminal. On my 4k laptop (13") it is close to impossible to read it.
Allow the use of *.elf
as the binary name so that the settings can be generic and project independent.
.gdbinit
SIGINT
There are 4 different scenarios requiring different mechanisms for interrupting the target.
On POSIX systems:
SIGINT
directly to the childSIGINT
must be sent to GDBOn Windows systems:
DebugBreakProcess
with a handle to the child process.GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0)
can be used to send SIGINT
to GDB, but this requires the sender to share a console window with GDB, and ignore the signal.POSIX signals are easily sent with Node's process.kill(pid, signal)
. The problem remains of how to tell if the target is remote. These are options:
SIGINT
to GDB, and then to reported PID if it hasn't halted after a timeout.How to even make Windows API calls from JS remains a mystery.
Stack local variables may now be added to the variable watch view, but double clicking on them in the expanded call stack view. This works well for inspection and assignments, but when setting a watchpoint on the variable object things can go wrong.
When the user requests a watchpoint on a variable object, we ask GDB for the expression for the object with -var-info-path-expression <path>
, and then set a watchpoint on this expression with -break-watch <expr>
. This expression may not be evaluated in the context in which it was created.
Use remote.Dialog
instead of remote.require("dialog")
Object.require (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/electron-shims.js:57:12)
Object.<anonymous> (/Users/esdentem/.atom/packages/atom-gdb-debugger/lib/config-view.coffee:12:19)
Object.<anonymous> (/Users/esdentem/.atom/packages/atom-gdb-debugger/lib/config-view.coffee:259:4)
Module._compile (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
Object..coffee (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/compile-cache.js:216:21)
Module.load (module.js:458:32)
@FabianGeiselhart pointed out on #5 :
I think the F11 button is a really bad choice, b/c it toggles the fullscreenmode on most systems...
I know the possibility of creating own keybindings files, but I think overwriting an shortcut as important as F11 is not a good idea anyway...
Using F8, F9, and F10 instead of F9 F10 F11 would be better on my System
The default keybindings are chosen to match those used by Visual Studio Code:
https://code.visualstudio.com/Docs/customization/keybindings#_debug
@esden argued the merits of keeping keys compatible with other tools.
I'm leaving this issue open for comment. If there are strong opinions I'll consider changing the defaults. Users can also reconfigure the keys in Atom using a custom key map.
[Enter steps to reproduce:]
Atom: 1.19.5 x64
Electron: 1.6.11
OS: linux 4.12.8-2-ARCH
Thrown From: atom-gdb-debugger package 0.2.2
Uncaught TypeError: Cannot read property 'getCursorBufferPosition' of undefined
At /home/asgreywolf/.atom/packages/atom-gdb-debugger/lib/editor-integration.coffee:78
TypeError: Cannot read property 'getCursorBufferPosition' of undefined
at EditorIntegration.module.exports.EditorIntegration._toggleBreakpoint (/packages/atom-gdb-debugger/lib/editor-integration.coffee:78:27)
at /packages/atom-gdb-debugger/lib/editor-integration.coffee:1:1)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/lib/atom/src/command-registry.js:265:29)
at /usr/lib/atom/src/command-registry.js:3:59
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/lib/atom/node_modules/atom-keymap/lib/keymap-manager.js:606:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/lib/atom/node_modules/atom-keymap/lib/keymap-manager.js:397:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/usr/lib/atom/src/window-event-handler.js:100:36)
at HTMLDocument.<anonymous> (/usr/lib/atom/src/window-event-handler.js:3:59)
-6:59.6.0 intentions:highlight (input.hidden-input)
-6:59.1.0 window:toggle-dev-tools (input.hidden-input)
-3:51 intentions:highlight (input.hidden-input)
-3:50.6.0 command-palette:toggle (input.hidden-input)
3x -3:49.6.0 core:backspace (input.hidden-input)
-3:46.9.0 core:confirm (input.hidden-input)
-3:46.9.0 settings-view:core (input.hidden-input)
2x -3:33.8.0 core:confirm (input.hidden-input)
3x -1:18.9.0 atom-gdb-debugger:connect (input.hidden-input)
-0:26.9.0 intentions:highlight (input.hidden-input)
-0:26 command-palette:toggle (input.hidden-input)
-0:24.7.0 core:confirm (input.hidden-input)
-0:24.7.0 settings-view:core (input.hidden-input)
-0:21.9.0 core:backspace (input.hidden-input)
-0:21.2.0 core:confirm (input.hidden-input)
-0:08.0 atom-gdb-debugger:toggle-breakpoint (input.hidden-input)
activate-power-mode 2.0.0
activate-power-mode-delete 0.6.1
atom-beautify 0.30.5
atom-gdb-debugger 0.2.2
atom-material-syntax 1.0.6
atom-material-syntax-dark 1.0.0
atom-material-ui 2.0.4
atom-polymer 0.13.0
autoclose-html 0.23.0
autocomplete-clang 0.11.3
autocomplete-glsl 0.2.3
autocomplete-java 1.2.7
autocomplete-oracle 1.2.0
autocomplete-python 1.10.1
autoprefixer 3.7.1
build 0.68.0
build-make 0.13.0
busy 0.7.0
busy-signal 1.4.3
clang-format 1.29.0
color-picker 2.2.5
convert-to-utf8 0.2.4
csscomb 0.3.1
dbg 1.6.1
dbg-gdb 1.7.6
docblockr 0.11.0
git-control 0.9.0
git-diff-details 1.4.0
git-log 0.4.1
git-plus 7.9.3
git-projects 1.17.0
git-time-machine 1.5.9
github-issues 0.9.0
graphviz-preview-plus 1.4.4
Hydrogen 1.20.0
hydrogen-xdbg 0.0.4
imdone-atom 2.2.6
imdone-atom-github 0.1.11
intentions 1.1.5
javascript-snippets 1.2.1
jshint 1.8.6
language-d 3.3.1
language-dot 1.7.0
language-glsl 2.0.1
language-matlab 0.2.1
language-opencl 0.1.1
language-oracle 1.8.0
linter 2.2.0
linter-clang 4.1.2
linter-cppcheck 0.2.3
linter-csslint 1.3.4
linter-gcc 0.7.1
linter-javac 1.9.4
linter-opencl 1.0.2
linter-polymer 0.0.3
linter-pycodestyle 2.0.2
linter-ui-default 1.6.5
linter-write-good 0.9.0
minimap 4.29.6
minimap-git-diff 4.3.1
minimap-linter 2.0.2
minimap-split-diff 0.3.7
output-panel 0.3.4
platformio-ide-terminal 2.5.5
python-jedi 0.3.8
script 3.15.0
split-diff 1.4.3
symbols-tree-view 0.14.0
sync-settings 0.8.2
tree-view-git-status 1.4.0
Hello!
I'm on OSX 10.12.4 / atom 1.16.0.
When I try to add a second project in tree-view I can't configure atom-gdb-debugger for it.
It always switching to the first project in tree-view.
Opening the project in a new window resolves the issue.
I's there any config file for atom-gdb-debugger in the root-directory of the project?
After adding a watchpoint to a global array, and then restarting the debug session, causes the "remove" button to not work. After re-adding the array, all elements in the array are duplicated when expanded.
Have a look, I can create better instructions for this when I am at an editor again.
TextEditor.prototype.editorElement
has always been private, but now
it is gone. Reading the editorElement
property still returns a
reference to the editor element but this field will be removed in a
later version of Atom, so we recommend using the element
property instead.
TextEditor.editorElement (<embedded>:2459:16)
EditorIntegration._hookEditor (C:\Users\Giuseppe\.atom\packages\atom-gdb-debugger\lib\editor-integration.coffee:168:14)
<unknown> (C:\Users\Giuseppe\.atom\packages\atom-gdb-debugger\lib\editor-integration.coffee:3:59)
Workspace.observeTextEditors (<embedded>:28316:15)
new EditorIntegration (C:\Users\Giuseppe\.atom\packages\atom-gdb-debugger\lib\editor-integration.coffee:71:45)
Object.activate (C:\Users\Giuseppe\.atom\packages\atom-gdb-debugger\lib\atom-gdb-debugger.coffee:118:39)
If possible, make so all the settings made to the package are saved in config.cson. This would greatly facilitate the automatic installation of all ones settings.
In atom-gdb-debugger\styles\atom-gdb-debugger.less
:
Starting from Atom v1.13.0, the contents of atom-text-editor
elements are no longer encapsulated within a shadow DOM boundary. This means you should stop using :host
and ::shadow
pseudo-selectors, and prepend all your syntax selectors with syntax--
. To prevent breakage with existing style sheets, Atom will automatically upgrade the following selectors:
.atom-text-editor .line.gdb-frame, :host .line.gdb-frame, atom-text-editor .line.gdb-frame, atom-text-editor::shadow .line.gdb-frame
=> .atom-text-editor .line.gdb-frame, :host .line.gdb-frame, atom-text-editor .line.gdb-frame, atom-text-editor.editor .line.gdb-frame
.atom-text-editor .line-number.gdb-bkpt .icon-right, :host .line-number.gdb-bkpt .icon-right, atom-text-editor .line-number.gdb-bkpt .icon-right, atom-text-editor::shadow .line-number.gdb-bkpt .icon-right
=> .atom-text-editor .line-number.gdb-bkpt .icon-right, :host .line-number.gdb-bkpt .icon-right, atom-text-editor .line-number.gdb-bkpt .icon-right, atom-text-editor.editor .line-number.gdb-bkpt .icon-right
.atom-text-editor .line-number.gdb-bkpt .icon-right:before, :host .line-number.gdb-bkpt .icon-right:before, atom-text-editor .line-number.gdb-bkpt .icon-right:before, atom-text-editor::shadow .line-number.gdb-bkpt .icon-right:before
=> .atom-text-editor .line-number.gdb-bkpt .icon-right:before, :host .line-number.gdb-bkpt .icon-right:before, atom-text-editor .line-number.gdb-bkpt .icon-right:before, atom-text-editor.editor .line-number.gdb-bkpt .icon-right:before
Automatic translation of selectors will be removed in a few release cycles to minimize startup time. Please, make sure to upgrade the above selectors as soon as possible.
on ubuntu 14.04.4 , atom 1.13.0
When I press F9 , it error..
Hello,
I am looking to develop in C ++ with ATOM.
I followed this tutorial :
Tutorial
I installed MinGW on my PC under Windows 10.
I configured my Windows Path.
I restarted Windows to validate the new Path.
I installed gpp-compile.
OK 👍 I can compile my C ++ programs.
I installed atom-gdb-debugger.
I pressed F12 to configure the debugger, atom-gdb-debugger asks me for a binary target.
Where is the target binary of my C ++ program?
In atom-gdb-debugger/styles/atom-gdb-debugger.less
:
Starting from Atom v1.13.0, the contents of atom-text-editor
elements are no longer encapsulated within a shadow DOM boundary. This means you should stop using :host
and ::shadow
pseudo-selectors, and prepend all your syntax selectors with syntax--
. To prevent breakage with existing style sheets, Atom will automatically upgrade the following selectors:
.atom-text-editor .line.gdb-frame, :host .line.gdb-frame, atom-text-editor .line.gdb-frame, atom-text-editor::shadow .line.gdb-frame
=> .atom-text-editor .line.gdb-frame, :host .line.gdb-frame, atom-text-editor .line.gdb-frame, atom-text-editor.editor .line.gdb-frame
.atom-text-editor .line-number.gdb-bkpt .icon-right, :host .line-number.gdb-bkpt .icon-right, atom-text-editor .line-number.gdb-bkpt .icon-right, atom-text-editor::shadow .line-number.gdb-bkpt .icon-right
=> .atom-text-editor .line-number.gdb-bkpt .icon-right, :host .line-number.gdb-bkpt .icon-right, atom-text-editor .line-number.gdb-bkpt .icon-right, atom-text-editor.editor .line-number.gdb-bkpt .icon-right
.atom-text-editor .line-number.gdb-bkpt .icon-right:before, :host .line-number.gdb-bkpt .icon-right:before, atom-text-editor .line-number.gdb-bkpt .icon-right:before, atom-text-editor::shadow .line-number.gdb-bkpt .icon-right:before
=> .atom-text-editor .line-number.gdb-bkpt .icon-right:before, :host .line-number.gdb-bkpt .icon-right:before, atom-text-editor .line-number.gdb-bkpt .icon-right:before, atom-text-editor.editor .line-number.gdb-bkpt .icon-right:before
Automatic translation of selectors will be removed in a few release cycles to minimize startup time. Please, make sure to upgrade the above selectors as soon as possible.
Atom: 1.20.0 x64
Electron: 1.6.11
OS: linux 4.12.13-1-ARCH
Thrown From: atom-gdb-debugger package 0.2.2
Uncaught TypeError: Cannot read property 'editorElement' of undefined
At /home/pradana/.atom/packages/atom-gdb-debugger/lib/editor-integration.coffee:7
TypeError: Cannot read property 'editorElement' of undefined
at posFromMouse (/packages/atom-gdb-debugger/lib/editor-integration.coffee:7:15)
at EditorIntegration.module.exports.EditorIntegration._toggleBreakpoint (/packages/atom-gdb-debugger/lib/editor-integration.coffee:76:21)
at /packages/atom-gdb-debugger/lib/editor-integration.coffee:1:1)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/lib/atom/src/command-registry.js:265:29)
at CommandRegistry.handleCommandEvent (/usr/lib/atom/src/command-registry.js:3:59)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/usr/lib/atom/src/command-registry.js:166:19)
at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/usr/lib/atom/src/atom-environment.js:1338:28)
at EventEmitter.outerCallback (/usr/lib/atom/src/application-delegate.js:334:25)
at emitThree (events.js:116:13)
at EventEmitter.emit (events.js:194:7)
-4:49.9.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always)
-4:32.1.0 atom-gdb-debugger:toggle-panel (ul.list-inline.tab-bar.inset-panel)
-4:24.9.0 atom-gdb-debugger:configure (ul.list-inline.tab-bar.inset-panel)
-4:23.1.0 atom-gdb-debugger:connect (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
3x -4:13.1.0 core:move-left (input.hidden-input)
-4:11.8.0 core:move-right (input.hidden-input)
-3:58.4.0 command-palette:toggle (input.hidden-input)
3x -3:49.7.0 core:backspace (input.hidden-input)
-3:39.1.0 atom-gdb-debugger:toggle-breakpoint (input.hidden-input)
-3:24.8.0 command-palette:toggle (input.hidden-input)
-3:18.5.0 core:move-down (input.hidden-input)
-3:17.8.0 core:confirm (input.hidden-input)
2x -3:17.8.0 atom-gdb-debugger:toggle-breakpoint (input.hidden-input)
atom-beautify 0.30.5
atom-gdb-debugger 0.2.2
atom-ide-ui 0.3.3
autocomplete-clang 0.11.3
autocomplete-cmake 0.3.1
build 0.68.0
busy 0.7.0
busy-signal 1.4.3
file-icons 2.1.11
highlight-selected 0.13.1
ide-python 0.1.1
ide-typescript 0.1.6
intentions 1.1.5
language-cmake 0.3.0
language-ini 1.19.0
linter 2.2.0
linter-flake8 2.2.1
linter-gcc 0.7.1
linter-shellcheck 1.4.6
linter-ui-default 1.6.10
minimap 4.29.6
monokai 0.24.0
open-recent 5.0.0
pigments 0.40.2
platformio-ide-debugger 1.2.4
platformio-ide-terminal 2.6.0
tool-bar 1.1.0
This is similar to #23 because both of these issues arise from adding a breakpoint via the atom-gdb-debugger UI.
It would be nice to be able to save GDB config presets that can be used when configuring a session. These presets should be project independent and stored globally.
I'd really find it useful if the "info reg" are neatly formated in a box under "Call Stacks" that can be expanded etc like the other boxes there.
I get this error when I installed under this machine Linux axe-20aws2t12n 5.10.7-3-MANJARO #1 SMP PREEMPT Fri Jan 15 21:11:34 UTC 2021 x86_64 GNU/Linux
Fetching featured packages failed.Hide output…
internal/modules/cjs/loader.js:807
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: /usr/lib/node_modules/atom-package-manager/node_modules/git-utils/build/Release/git.node: undefined symbol: _ZN2v82V818GlobalizeReferenceEPNS_8internal7IsolateEPm
at Object.Module._extensions..node (internal/modules/cjs/loader.js:807:18)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/usr/lib/node_modules/atom-package-manager/node_modules/git-utils/src/git.js:3:22)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
On OSX 10.12.5 defined watchpoints stay in the watchpoint-panel when toggle connection but don't work any more (in the cli "info watch" does not show any watchpoints).
When i define watchpoints in the config view they are loaded fine on the first connection.
but when toggling the connection they freeze as well.
Maybe a reload of the package at connection will help...
This atom-gdb-debugger package can be used in what operating system,linux,win10
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.