Stepping through an extension in the way you describe, amounts to stepping through the gnome-shell process. Presumably something like gdb --args gnome-shell --nested --wayland, and breakpoints set with System.breakpoint() would work, but I’m not aware of anyone going to that length for an extension.
If the code can be extracted or is part of a separate process already, it’s probably easier to step through it with the built-in debugger using gjs --debugger FILE.
Does the gjs command wait for gnome to call up the js file? Or does it execute right away the file it is given? To find out why fileItemMenu.js does not do what I expect I would need to step through it when a desktop icon is right clicked.
The menu item “Don’t Allow Launching” / “Allow Launching” does not appear when a launch icon is right clicked in my desktop. I am not able to allow launching, in spite of using the gio command: gio set "/home/stephen/Desktop/Flameshot.desktop" metadata::trusted true
That this command worked was verified with the command: gio info -a 'metadata::*' /home/stephen/Desktop/Flameshot.desktop
Group, and Others, can only view this desktop file. The icon is marked executable. All conditions I know to be able to allow launching are met. Yet the desktop icon is still grayed out, and it does not launch. The same is true of any other desktop launcher icon I set up.
So to find out why I now I need to inspect the values of:
I decided the easiest way for me to inspect those variable’s values would be for me to modify the menu to display the variable(s) whose value is preventing the display of the “Don’t Allow Launching” / “Allow Launching” item. Using Gnome’s Builder I modified fileItemMenu.js as shown in the below code snippet:
I am not able to enable launching for any icon on my desktop because the value of : “this._desktopManager.writableByOthers” is true. Right now I do not know how it become true, or how to fix it so it its value is false as it should be. In any documentation I have seen for desktop launchers I have not seen this condition included as a requirement to enable the option to allow launching.