idleberg / vscode-applescript

Language syntax and snippets for AppleScript
https://marketplace.visualstudio.com/items?itemName=idleberg.applescript
MIT License
72 stars 8 forks source link

Line number on error message #18

Closed ghost closed 5 years ago

ghost commented 5 years ago

First of all thanks for this great extension, it is truly another way to manage Applescripts :-D When it is running or compiling the code and it is encountered an error, is it possible to have the line number of the wrong part of the code? Thank you so much in advance.

idleberg commented 5 years ago

By default, osascript returns errors within character range.

Example:

30:31: syntax error: Expected end of line, etc. but found identifier. (-2741)

This means that an error occurred between characters 30 and 31, counting all characters in the document.

I agree that this is annoying and I think it might be a good idea to have an option that (additionally) displays line and column. Might take a while though, since I'm on the road for two weeks.

ghost commented 5 years ago

Thank you so much for the answer.

I understood this yesterday evening and installed an extension that give the change to reach a position... nice... problem solved 👍🏽

Thx

idleberg commented 5 years ago

v0.18.0 now has an option to switch between the default ranges and line/column