Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
gjs
gjs
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 91
    • Issues 91
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 10
    • Merge Requests 10
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Registry
    • Registry
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards

Getting colder with our second freeze... it's 3.31.91 release day and string freeze, upload a tarball and lock those strings 🏂

  • GNOME
  • gjsgjs
  • Issues
  • #207

Closed
Open
Opened Sep 24, 2018 by Philip Chimento@ptomato🚮
  • Report abuse
  • New issue
Report abuse New issue

Display current line of source code when displaying the current frame in the debugger

In the debugger, if you print the current frame you will get output in the format of:

#frame   functionName(argument, argument) at file.js:line:column

In order to help you figure out where you are in the source without having to keep the file open and cross-reference the line numbers to your editor, it would be best to show the corresponding line of source code when the frame is printed.

Being able to load the source code would also make it possible to implement a list command (see here for an explanation of GDB's equivalent.)

An example session might look something like this:

gjs -d examples/gtk.js 
GJS debugger. Type "help" for help
db> break 27
Breakpoint 1 at examples/gtk.js:27:4
db> c
Breakpoint 1, onDeleteEvent([object GObject_Object], [object GObject_Union]) at examples/gtk.js:27:4
db> f
#0    onDeleteEvent([object GObject_Object], [object GObject_Union]) at examples/gtk.js:27:4
  27     log('delete-event emitted');
db> l
  22 // are marked construct-only.
  23 window.title = 'Hello World!';
  24
  25 // This is a callback function
  26 function onDeleteEvent() {
* 27     log('delete-event emitted');
  28     // If you return false in the "delete_event" signal handler, Gtk will emit
  29     // the "destroy" signal.
  30     //
  31     // Returning true gives you a chance to pop up 'are you sure you want to
  32     // quit?' type dialogs.
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
No due date
3
Labels
1. Feature 4. Help Wanted 5. DX
Assign labels
  • View project labels
Reference: GNOME/gjs#207