Closed
Description
Bug Report
🔎 Search Terms
- refactor
- refactoring
🕗 Version & Regression Information
5.1.0-dev.20230509
Repo
- In VS code with the code:
const a = 1;
- Select the entire statement and run the
move to file
refactoring - Select a invalid destination file (such as a
.png
)
bug
See the ugly error:
Debug Failure. Error: Debug Failure. at doChange4 (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:136348:36) at /Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:136336:77 at Function.with (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:165627:5) at Object.getRefactorEditsToMoveToFile [as getEditsForAction] (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:136336:60) at Object.getEditsForRefactor (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:135426:31) at
...
Instead we should show a better message that says something like:
Cannot move to file, selected file is invalid