This is a migrated thread and some comments may be shown as answers.

Clode Code Debug Error

13 Answers 53 Views
JavaScript SDK
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
James
Top achievements
Rank 1
James asked on 08 Sep 2015, 06:55 AM

Hi, 

I have been trying to debug some back end cloud code functions/data endpoints however whenever i bring up the debugger the debugger loads but doesn't seem to connect to the backend application, in the console I get the following error: 

Page.getResourceContent failed.
Error: ENOENT, open '/Application/DebugServer.js'

Any insight into why this might be occurring?

 

Thanks, 

 

 

13 Answers, 1 is accepted

Sort by
0
Anton Dobrev
Telerik team
answered on 09 Sep 2015, 03:26 PM
Hi James,

Can you confirm that you are using Chrome and your debug session is successfully started?

Also, make sure that the debug request is marked with the required header as explained here.

Note that the error you observed should not affect the debugging experience, though, I must admit this is not the expected behavior.

Regards,
Anton Dobrev
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
0
James
Top achievements
Rank 1
answered on 09 Sep 2015, 06:17 PM

Hi Anoton, 

I am using chrome, I have tried the feature in both chrome 45.0.2454.85 and chrome canary 47.0.2500.0. Screen shots attached. I have been initiating the connection by clicking on the debug link within the cloud code > business logic > [selected fuction] clicking debug and then clicking on the link that is generated on the right. From what I have read that should be sufficient but let me know if I'm wrong here. 

Tested on mac & windows, if that makes any difference. 

0
Vasil
Telerik team
answered on 14 Sep 2015, 02:54 PM
Hello James,

This particular error should have no effect over the debugging. In order to view your cloud code you need to click on the little triangle in the top left corner of the window, right next to the DebugServer.js tab. This will expand the side menu and show you a tree with the cloud code files. This should resolve the issues you have with cloud code debugging.

Regards,
Vasil
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
0
James
Top achievements
Rank 1
answered on 14 Sep 2015, 04:21 PM

Seems like im not having much luck with your debugger... I no longer get the error I was previously getting... now its within the console that launches I get the following error: 

Your Node version (v0.10.33) has a partial support of profiler.
The stack frames tree doesn't show all stack frames due to low sampling rate.
The profiling data is incomplete and may show misleading results.
Update Node to 0.11.13 or newer to get full support.
Error: Cannot find module '/usr/lib/node_modules/node-inspector/lib/InjectorServer.js'
Profiler.getProfileHeaders failed.
Error: Unknown command "Profiler.getProfileHeaders" in request
HeapProfiler.getProfileHeaders failed.
Error: Unknown command "HeapProfiler.getProfileHeaders" in request

 

None of my sources show in the source files show in the source panel... see attached image. No console output within my cloud code gets to the console... ie, no console.logs... no errors... etc.

This feature is just not working. 

 

 

0
Vasil
Telerik team
answered on 15 Sep 2015, 11:03 AM
Hi James,

I apologize for the inconvenience. It appears that there was bug with one of the modules which we are using and we have updated the version of that component. Please check if everything is working correctly now.

Regards,
Vasil
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
0
James
Top achievements
Rank 1
answered on 15 Sep 2015, 08:25 PM

Hi Vasil

I can now see my code files, however I do not see out console.log output when hitting my endoint. Could that be due to the Debug header not being included with the request? 

 

Thanks, 

0
Vasil
Telerik team
answered on 16 Sep 2015, 10:26 AM
Hi James,

Unfortunately the cloud code log is saved only for regular requests. As for cloud code debugging you should be able to view all the necessary information in real time as the request happens.

Please let me know if there is anything else I can assist you with.

Regards,
Vasil
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
0
Anthony
Top achievements
Rank 1
answered on 29 Sep 2015, 08:36 AM

Hi

I am getting the same error as James, I cannot debug using the cloud source business logic explorer:
Error: Cannot find module '/usr/lib/node_modules/node-inspector/lib/InjectorServer.js'

Could you please assist?

Kind Regards
David

0
Vasil
Telerik team
answered on 29 Sep 2015, 11:40 AM
Hi Trevor,

I apologize for the inconvenience. I have double checked and it appears that there was an issue with one of the debugging servers. Subsequently I resolved it and I believe everything should be fine with the debugging feature, so please try again.

Once again I apologize for the inconvenience.

Regards,
Vasil
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
0
James
Top achievements
Rank 1
answered on 29 Sep 2015, 05:34 PM

Hi Vasil, 

Should we not be expecting to see console output from our server code within the chrome debug console window that opens in chrome?? for example in my cloud code if i insert the following line:

console.log('I should see this'); 

 within the beforeRead method code, should this not output the string 'I should see this' to the console panel in the chrome remote debugger upon me hitting that cloud code resource?

 While the debugger no longer thows errors in chrome, I'm still  not getting through to the console. The only thing that seems to work is the ability to view my cloud code files... breakpoints no go. 

The only way that I currently see console output from any of my cloud data / functions is through the console output in the web application, which needs to be refreshed for every request. And shows nothing in the event of a error, in that case the only method way i can see the console output is if im lucky enough that it was caught in the log. 

I've been having trouble with this feature so after some research I also found out that the windows app can be connected to cloud code debug endpoint, however when i access the application debugger through the windows app builder the console loads with the following error output:

 Page.canScreencast failed.
Error: Not implemented.
Debugger.setAsyncCallStackDepth failed.
Error: Not implemented.
Debugger.skipStackFrames failed.
Error: Not implemented.
DOM.enable failed.
Error: Not implemented.
Worker.setAutoconnectToWorkers failed.
Error: Not implemented.
Worker.enable failed.
Error: Not implemented.
Profiler.setSamplingInterval failed.
Error: Not implemented.
ServiceWorker.enable failed.
Error: Not implemented.
Emulation.canEmulate failed.
Error: Not implemented.
Emulation.setScriptExecutionDisabled failed.
Error: Not implemented.
DOM.getDocument failed.
Error: Not implemented.

Is there anyway I we can troubleshoot this issue one on one? I have outlined my problems here in addition 2 support tickets but no working solution has been achieved. 

0
Anthony
Top achievements
Rank 1
answered on 30 Sep 2015, 01:02 PM

Hi

Thanks my JS node inspector error was resolved.
But I logged a new issue because debugging is very slow (The forum link seems to be broken though: 
http://www.telerik.com/forums/cloud-codedebug-extremely-slow-none-responsive)
Regards
David

0
James
Top achievements
Rank 1
answered on 30 Sep 2015, 05:12 PM

Hey Trevor, 

 Does the console work on your remote debugger? 

0
Vasil
Telerik team
answered on 01 Oct 2015, 10:45 AM
Hello,

The console functions were initially added to ease development, before we introduced the cloud code debug feature. We haven't planned for them to work when debugging as you should be able to view the behavior and get an insight of your application in real time.

We would need to investigate further regarding the issue with debugging in the Windows AppBuilder application.

In regards to performance - I have just tried and everything seems to be working correctly in regards to debugging performance. It is possible that the cloud code might be slow, due to an external call for example.

Regards,
Vasil
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
Tags
JavaScript SDK
Asked by
James
Top achievements
Rank 1
Answers by
Anton Dobrev
Telerik team
James
Top achievements
Rank 1
Vasil
Telerik team
Anthony
Top achievements
Rank 1
Share this question
or