Command list generated with commands run after exception is displayed
rsese opened this issue · 0 comments
Prerequisites
Not run in safe mode so we could use the command added to the init script to generate an error
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
h/t @Ben3eeE for finding this comment - as mentioned by Lee in atom/atom#11690 (comment):
thank you for pointing out that the command list is generated when the Issue is submitted, not when the dialog is displayed
So when an error notification is displayed, the Commands
section generated includes things you do after the dialog is displayed which can be misleading as Lee mentions further in that comment:
That's a bug we should fix ... it could be sending us down some blind alleys 😀
If you perform enough actions, the actual actions related to generating the error aren't shown since it seems like 16 commands are shown and the rest is truncated?
Steps to Reproduce
Add this to your init.coffee
so you can generate an error h/t @lee-dohm:
atom.commands.add 'atom-workspace',
'custom:throw-error': ->
throw new Error
- Start Atom (not in safe mode so we can use the command above)
- From the command palette, run
Custom: Throw Error
(error notification shows at this point) - Run some other commands e.g. use the command palette to
Tree View: Toggle
6 times - Copy the error report to clipboard (click the clipboard icon in the exception dialog)
- Paste the error report to examine the
Commands
section.
Expected behavior: [What you expect to happen]
To see commands up to when the error dialog is displayed.
Actual behavior: [What actually happens]
Commands run after the dialog is displayed are shown in the Commands
section:
-0:06.6.0 tree-view:toggle (input.hidden-input)
-0:06.0 command-palette:toggle (input.hidden-input)
-0:05.2.0 core:confirm (input.hidden-input)
-0:05.2.0 tree-view:toggle (input.hidden-input)
-0:04.8.0 command-palette:toggle (div.tool-panel.tree-view)
-0:04.4.0 core:confirm (input.hidden-input)
-0:04.4.0 tree-view:toggle (div.tool-panel.tree-view)
-0:04.0 command-palette:toggle (input.hidden-input)
-0:03.6.0 core:confirm (input.hidden-input)
-0:03.6.0 tree-view:toggle (input.hidden-input)
-0:03.0 command-palette:toggle (div.tool-panel.tree-view)
-0:02.6.0 core:confirm (input.hidden-input)
-0:02.6.0 tree-view:toggle (div.tool-panel.tree-view)
-0:02.3.0 command-palette:toggle (input.hidden-input)
-0:01.9.0 core:confirm (input.hidden-input)
-0:01.9.0 tree-view:toggle (input.hidden-input)
For comparison, if I copy the error report right after step 2, then the generated Commands
section looks like this:
-0:03.1.0 command-palette:toggle (input.hidden-input)
-0:01.8.0 core:confirm (input.hidden-input)
-0:01.8.0 custom:throw-error (input.hidden-input)
Reproduces how often:
100%
Versions
$ atom -v
Atom : 1.27.0-dev-8ef1a05f2
Electron: 1.7.11
Chrome : 58.0.3029.110
Node : 7.9.0
$ apm -v
apm 1.19.0
npm 3.10.10
node 6.9.5 x64
atom 1.27.0-dev-8ef1a05f2
python 2.7.10
macOS 10.12.6
/cc @Ben3eeE ✌️