NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Debugging embedded javascript code in php files

 
Post new topic   Reply to topic    NetBeans Forums -> Web Client Users
View previous topic :: View next topic  
Author Message
Stratos1986



Joined: 09 Mar 2016
Posts: 1

PostPosted: Wed Mar 09, 2016 7:26 pm    Post subject: Debugging embedded javascript code in php files Reply with quote

Hello everyone. I am trying to debug javascript code that has been embedded using the <script type=text/javascript> in a php file, but the debugger never stops if I put a breakpoint inside that code (I also see that the breakpoint is unresolved). Of course if I add the same code into a separate .js file the debugging works as expected and I can stop execution of the code on breakpoints. On the other hand, if I use Google Chrome's dev tools, I can add breakpoints inside the javascript code between the <script> tags and it pauses execution on those breakpoints. Am I missing some setting that I need to configure to handle this case? I'm running Netbeans 8.1. Thanks in advance!

Here is just some small test code:

Code:

<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
       
    </head>
    <body>
        <div>
            <h1 id="header">Testing</h1>
            <h2>More text.</h2>
        </div>
        <?php
        echo "hello everyone!";
        ?>
        <script src="js/libs/jquery/jquery.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                alert('Hi there!');
            });
        </script>
    </body>
</html>
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Web Client Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo