formulahendry / formulahendry/vscode-code-runner
[Bug] Code Runner ignores unsaved changes in code. Runs last saved file state.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 351
- PR merge metrics
- No merged PRs in 30d
Description
- VS Code Version: 1.56.2
- OS Version: Win7-64
- Code Runner Version: 0.11.4
**Describe the bug**
If I open an existing file, make changes to the code, and then run code runner without first saving those changes, code runner will ignore those changes and run the code as it existed in the last saved file state.
This is apparent in the output, which shows that code runner is running the existing file instead of a temporary file.
This could be solved by using "select all (ctrl-a)" to highlight the entire document and then running the code, but sometimes I might forget to do that and be misled by the inaccurate run results.
This could also be solved by checking the option "Save File Before Run", but sometimes I want to test changes to the code before saving them.
**To Reproduce**
Steps to reproduce the behavior:
1. Open an existing code file
2. Alter the code without saving the file
3. Right-click on the editor and select "Run Code"
**Actual behavior**
The results ignored the altered code
**Expected behavior**
The results should have run the altered code
**Screenshots**
N/A
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.