Clode Code Debug Error

14 posts, 0 answers
  1. James
    James avatar
    12 posts
    Member since:
    Jun 2015

    Posted 08 Sep 2015 Link to this post

    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, 

     

     

  2. Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 09 Sep 2015 Link to this post

    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.
     
  3. James
    James avatar
    12 posts
    Member since:
    Jun 2015

    Posted 09 Sep 2015 in reply to Anton Dobrev Link to this post

    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. 

  4. Vasil
    Admin
    Vasil avatar
    19 posts

    Posted 14 Sep 2015 Link to this post

    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.
     
  5. James
    James avatar
    12 posts
    Member since:
    Jun 2015

    Posted 14 Sep 2015 Link to this post

    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. 

     

     

  6. Vasil
    Admin
    Vasil avatar
    19 posts

    Posted 15 Sep 2015 Link to this post

    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.
     
  7. James
    James avatar
    12 posts
    Member since:
    Jun 2015

    Posted 15 Sep 2015 Link to this post

    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, 

  8. Vasil
    Admin
    Vasil avatar
    19 posts

    Posted 16 Sep 2015 Link to this post

    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.
     
  9. Trevor
    Trevor avatar
    15 posts
    Member since:
    Apr 2014

    Posted 29 Sep 2015 Link to this post

    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

  10. Vasil
    Admin
    Vasil avatar
    19 posts

    Posted 29 Sep 2015 Link to this post

    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.
     
  11. James
    James avatar
    12 posts
    Member since:
    Jun 2015

    Posted 29 Sep 2015 Link to this post

    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. 

  12. Trevor
    Trevor avatar
    15 posts
    Member since:
    Apr 2014

    Posted 30 Sep 2015 Link to this post

    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

  13. James
    James avatar
    12 posts
    Member since:
    Jun 2015

    Posted 30 Sep 2015 in reply to Trevor Link to this post

    Hey Trevor, 

     Does the console work on your remote debugger? 

  14. Vasil
    Admin
    Vasil avatar
    19 posts

    Posted 01 Oct 2015 Link to this post

    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.
     
Back to Top