Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug run doesn't detect change in event input file until edit configuration #910

Closed
Marakai opened this issue Apr 12, 2019 · 4 comments
Closed
Labels
bug We can reproduce the issue and confirmed it is a bug.

Comments

@Marakai
Copy link

Marakai commented Apr 12, 2019

Describe the bug
Debugging a function with a file-based even input does not detect changes to the JSON even file until re-opening Edit Configuration and clicking OK.

Tested with CloudFormation Create event.

To reproduce

  1. Create function and template
  2. Create an event file (instead of the preset text even samples)
  3. Edit Configuration to configure
  4. Click OK
  5. (optional) set breakpoint early in function to be able to see even data
  6. Run/Debug
  7. Look at event data
  8. End run/debug
  9. Change JSON event file with some new/added/changed/deleted event data
  10. Run/Debug
  11. The event data did NOT pick up the changes!
  12. End run/debug
  13. Edit Configuration
  14. Change nothing, simply click OK again
  15. Run/Debug
  16. Now the changes in the event file appear!

Expected behavior
Event data file should be read before every function run/debug to recognise any changes without having go through Edit Configuration/OK (unless, of course, an actual change in other configuration occurs).

Your Environment

  • OS: MacOS
  • JetBrains' Product: Pycharm
  • JetBrains' Product Version: 2019.1.1
  • Toolkit Version: 1.2
  • SAM CLI Version: 0.14.2
  • JVM/Python Version: 1.8.0_201/3.7
@abrooksv
Copy link
Contributor

I was not able to reproduce this in 1.3

@abrooksv abrooksv added the needs-response Waiting on additional info and feedback from GitHub community. (no auto closure) label May 17, 2019
@abrooksv
Copy link
Contributor

Actually if you don't explicitly hit Save shortcut, it doesn't pick it up. Looks like we are missing a call to save all open documents.

@abrooksv abrooksv added bug We can reproduce the issue and confirmed it is a bug. and removed needs-response Waiting on additional info and feedback from GitHub community. (no auto closure) labels May 17, 2019
@Marakai
Copy link
Author

Marakai commented May 18, 2019

Can confirm that doing explicit File->Save All also works (without explicit Edit Configuration step), so it does seem that save of docs is the missing step.

@abrooksv
Copy link
Contributor

This was fixed and released in 1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug We can reproduce the issue and confirmed it is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants