coffeescript sourcemaps not working with Chrome developer tool - coffeescript

I configured the coffeescript compiler to run map (-m) using IntelliJ with NodeJS.
I assume with the source maps I should be able to debug in coffeescript files in Chrome developer tool. The enable souce map was checked. I tried to open any .coffee file but got the "Cannot GET /path.../foo.coffee" error. The folder of where the coffeescript files resides in the sources explorer was weird. ../../../../../Web/src/test/webapps/installManager
I think it reflects what's in the map.
"sourceRoot": "../../../../..",
"sources": [
"Web/src/test/webapps/installManager/app.coffee"
],
I do have sourceMappingURL in my js files.
/*
//# sourceMappingURL=Common.map
*/
The following is my configuration for running the Coffeescript compiler:
Application Parameters:
-cwm /home/repository/svn/ding/Web/src/test/webapps
Why can't Chrome get the coffee file since that the maps are available now? Is it because of the path in the sourceRoot and sources in the maps?
I was able to add workspaces in Chrome canary and map them and even do the bidirectional editing but I still can't debug (can set breakpoints but the debugger never stopped at the breakpoints).
Thank you

I fixed my problems - it was all in the cross references between the js coffee and map files. As soon as I configured it so that the transpiled .js was placed right next to the coffee (and the map, it picked it up.

Related

Debugging WebAssembly in Chrome

I'm a relative newbie to WebAssembly, but I've been working with it and Emscripten for about a month now, and have a decent familiarity with the minimal build kits.
When it comes to debugging, I am finding that I cannot find how get the most out of both Chrome and Firefox environments.
In Firefox 68.0.1 my Source Map files load and I can map them correctly to my C/C++ source files.
I cannot, however, see the local stack. I can see all the local variables, but as I step through my wasm code, as FF displays it, it's pushing things to a stack I can't see, and keeping track of that manually is a pain.
Chrome 76, by contrast, gives me the stack, will let me add the Source Map to see my C/C++ references, but I cannot get it to give me any kind of wasm code to step through, either my own wast file, or its own disassembled version.
All wasm I load, either from node http-server or from emscripten emrun, shows me my source code in the "Sources" tab of DevTools, but there is a second node under localhost that is labeled "top/(no domain)." I've tried loading a simple module with no success.
I would like to either figure out how to view the local stack in FireFox or get Chrome to show me the wasm disassembly (preferably both). Chrome seems to do so for WebAssembly Studio and I cannot find out why

Installing sass in Netbeans 8.0.2

I know there are questions like this on SO, but none of the given solutions helped me.
I also tried to ask this question on netbeans forum, but they haven't responded to my questions, probably because they just don't know answers.
SO community is a "bit" bigger than the one on the netbeans forum, so I hope I'll get some clue.
I'm trying to get SASS working in Netbeans 8.0.2 (Ubuntu). I installed sass, it sits in /sur/local/bin/sass. I set up this path in NB options. I set up paths in project properties. And... nothing happens when I save a css file. Shouldn't there be at least a warning message if something's wrong?
Yes, I have "generate extra information (debug)" and "open output on error" checked. The path to the sass executable is also correct.
And yes, I also have "compile Sass files on Save" checked.
In project properties / Input and Output fields I tried relative and full urls. I also tried using ${web.root} variable.
I use Netbeans for PHP, but I don't think it matters.
None of these solutions work for me, especially that most of them is for Windows OS:
How to use SASS with Netbeans 8.0.1
Cannot get SASS to output .css file in Netbeans 8.0
Netbeans - installing SASS
Please help, I've been trying to make it working for the last 4 hours :(
Please tell me at least where can I find an error log or something.
Update:
The log says:
INFO [CPOnSaveHook]: processSavedFile called for Sass type on project
/var/www/html/analytics. INFO
[net.sickill.off.netbeans.NetbeansProject]: fileChanged: ignoring
internal file changes INFO
[org.netbeans.modules.css.prep.process.BaseProcessor]: Not compiling,
file /var/www/html/analytics/src/AppBundle/Resources/scss/admin.scss
not matched within current mappings
[Pair[/var/www/html/analytics/src/AppBundle/Resources/scss,/var/www/html/analytics/web/css]]
But as I said: In project properties / Input and Output fields I tried relative and full urls. I also tried using ${web.root} variable.
I solved my problem.
In the project properties -> css properties -> input/output fields there must not be / (a slash) at the beginning. So it should be e.g. "src/AppBundle/Resources/scss" instead of "/src/AppBundle/Resources/scss" And it should not be a full url (like /var/html/www/project...)
Also, using ${web.root} did not work.
I solved may problem. In project properties -> css prepocessor -> uncheck compile sass files on save:

Can't get prebuild hooks to work in Trigger.io

I'm keen to use coffeescript within Trigger.io and to do so I am following the details as described at http://docs.trigger.io/en/latest/tools/hooks.html
I've placed my coffeescript.js file in the hooks/prebuild directory as required but the build now fails. I've commented out everything in the coffeescript.js file to ensure it's not the file's contents.
It detects the coffeescript.js file in the prebuild directory as shown in the log output but then it can't find some file. Anyone else have this problem? I'm using version 1.4 of the Trigger Toolkit.
[INFO] Running (node) hook: coffeescript.js
[DEBUG] Running: 'node' '/Users/Will/forge-workspace/alpha-timing/hooks/prebuild/coffeescript.js' 'ios'
[ERROR] [Errno 2] No such file or directory
A slight tangent... but you might want to have a look at Brunch.io
I've recently started using it for building the JS for my trigger.io app and it works great. It can compile your coffeescript, js, css and more automatically. Comes with a watcher and auto-reload, so when you are developing and testing in browser it's very fast.
We use Node.js to transform the coffeescript into JS at the prebuild stage - it looks like you don't have it installed: go to http://nodejs.org/ to grab it.
Note you'll also need coffee-script to run that hook!

Eclipse #ifdef error using JNI, Android NDK and Vuforia

With Vuforia's ImageTargets sample application, I tried using OpenGL ES 1.1 by setting USE_OPENGL_ES_1_1 to true in jni/Android.mk and uncommenting and changing the corresponding line in AndroidManifest.xml (). After converting the project so that it has a C++ perspective and associating ndk-build and the proper include directories, I could successfully run the application on my Android device.
However, the problem is that once I open up jni/ImageTargets.cpp, I get several errors from Eclipse, all from places where OpenGL ES 2.0 code would execute, the first one being:
Description Resource Path Location Type Symbol 'vertexHandle' could
not be resolved ImageTargets.cpp /ImageTargets/jni line 402 Semantic
Error
Sure enough, vertexHandle is defined at the top of the ImageTargets.cpp, inside the "#ifdef USE_OPENGL_ES_2_0" block. Because USE_OPENGL_ES_2_0 is not defined (per Android.mk), the code should be able to compile successfully, and sure enough, ndk-build does not report any problems. So it seems that only Eclipse reports the problems and when I run the project, Eclipse says, "Your project contains error(s), please fix them before running your application." And thus, I cannot run my application anymore. In a sense, it's kind of strange that this never occurred until I opened ImageTargets.cpp and Eclipse "discovered" the errors.
The best work-around I've found so far is to just delete or comment out those lines (that should not be causing problems because USE_OPENGL_ES_2_0 is not supposed to be defined)... Is there a better way to deal with this problem? Did I miss a setting in Eclipse that should solve this?
I've found a solution: go to the project properties -> C/C++ Build -> Discovery Options -> Check "Automate discovery of paths and symbols"

Variable evaluation fails in Eclipse when debugging JavaScript using Chrome Dev Tools

I have installed the Chrome Dev Tools Eclipse plug-in as described on http://code.google.com/p/chromedevtools/ and debugging JavaScript basically works. I can set breakpoints in my JavaScript source files and when I run the JavaScript code in Chrome, Eclipse stops the execution and opens the Debug perspective. Stepping through the code works fine, and I can also see the local and global variables in the Variables view.
When clicking on one of the variables, the detail view shows an error message, though:
Helper script failed on remote: _com_chromium_debug_helper is not defined
Did I miss something during the installation?
Update
Added an issue on the project's page: http://code.google.com/p/chromedevtools/issues/detail?id=85
Most likely you should open an issue at the project page. It is definitely a bug and fixing it might require additional context from you.
This is internals of ChromeDevTools SDK's workaround for WebKit Remote Debugging protocol limitations.