-
-
Notifications
You must be signed in to change notification settings - Fork 905
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
fix: improve debugging of applications in third party tools and Studio #893
Conversation
@@ -117,6 +120,8 @@ exports.generateCodeAndSourceMap = function(generator, compileConfig) { | |||
// write the generated controller code | |||
var outfile = target.filepath; | |||
var relativeOutfile = path.relative(compileConfig.dir.project, outfile); | |||
outputResult.code += `\n//# sourceMappingURL=file://${compileConfig.dir.project}/${CONST.DIR.MAP}/${relativeOutfile}.${CONST.FILE_EXT.MAP}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like it is not appended to Common JS modules so far. Testing with https://github.com/hansemannn/studentenfutter-app, an advanced Alloy based app. Also, Safari does not seem to pick up the source map so far. Maybe the file:// prefix is invalid there? Testing with Android on Chrome next.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@feons Any update on that one? I've also requested @ewanharris for a QR as he's more into this 😙. Would be good to have source maps working for both iOS and Android, getting it out with the next feature release.
@feons Can we finish this one? |
This check was being performed on the destination file which never existed, we also no longer need to check for a directory here as it is checked prior to calling this function Fixes ALOY-1690
Part of ALOY-1612
@ewanharris I see activity here, whooop! :) Let me know if I can test on our larger scale project! |
This ensures that the code the the sourcemap is generated lines up a best as we can get with what is handed off to the sdk build process
Can one of you guide me on how this feature can be used? For a while I was able to use Safari Developer -> Simulator -> JSContext and see my JS files in the debugger. However, this doesn't seem to be working any more atleast for me with Ti SDK8.0.1.GA. Is there a guide somewhere elaborating how to debug with Chrome/Safari dev-tools? |
Hey @nirmaljpatel, this PR is currently going through some changes so I wouldn't recommend using it. We do have guides for debugging iOS via Safari and Android via Chrome, however be aware that for iOS there are currently some known issues TIMOB-27098 with debugging in Safari (which might be what you're referencing?) |
…p as a "source"" This reverts commit 344f41e.
- report absolute path for 'file' property - report absolute path for 'sourceRoot', not a file:// URI - embed sourcesContent for mapped files - fix line counts in source map after hitting template marker lines
some open TODOs:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me. Jenkins failure is due to a node connection timeout on the master run but the GA run was fine.
https://jira.appcelerator.org/browse/ALOY-1612