-
Notifications
You must be signed in to change notification settings - Fork 92
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
Can't add breakpoint #17
Comments
Please see #11 |
I'll try a simple project, my problem is on Windows 8 btw |
Ok I've tried a very simple project and it still doesn't add breakpoints, any other ideas? |
Hmm when I tried before I was using jQuery from Google's CDN, I downloaded it and breakpoints now work. Does every single script have to be loaded locally, even if you aren't interested in debugging it? If so is there a way around this? I don't always have every script locally on my machine, and I often use the SFTP package to upload to servers etc. |
Hmm this sound strange. Can you send me a sample project where breakpoints doesn't work? |
Here is the example using the Google jQuery CDN - https://dl.dropbox.com/u/3615425/web_inspector_test.zip |
I'm using Windows 7 and absolutely nothing happens when I use the Add/Remove Breakpoint command. |
I'm on Windows 7 also. Breakpoints work in a simple project, where scripts are included with |
@bbeckford you have error in your htm file I fixed it and run from local server on path 'http://localhost/adminui/web_inspector_test/index.htm' and everything works fine! @fencliff could you provide a sample project with RequireJS |
@sokolovstas, silly me! However, it seems in my testing any javascript error will mean I can't add a breakpoint. For example I have a dev site that shows an error due to no linked in api key being set, something I usually ignore whilst I'm building and debugging the rest of the site but would stop me from using web inspector, is this repairable? Thanks |
@bbeckford please provide more details:
I believe this is simple file and path errors. Also you can try close tab, open again and then connect inspector. |
For now now matching algorithm is:
|
@sokolovstas, I created a repro which shows that the issue was not in RequireJS script loading after all. The problem appears to be that the root folder opened in Sublime Text was the one "above" the web page root, so that my source url in the browser was This project is awesome. Thanks for all the good work! |
You must have at lease one folder with all content because plugin search for files in project folders! |
@bbeckford I can close issue? All works fine? |
OK so I have several instances where this isn't working, in different ways. 1: No errors given by the plugin. Just nothing was happening. In this case I had an error in the script, which was why it wasn't setting a breakpoint. This is bad because when I have errors, I'm more likely to WANT to use a breakpoint to try to figure it out. 2: Similar issue to @fencliff I believe. My project structure looks like this (the structure is the same in #1): So the browser's root folder (/) is "public". In this case I get this error in the little console below the inspector: 3: Just for kicks, I made "public" the root of the project and tried debugging. If the error that I mentioned in #1 is there, it'll let me put the breakpoint, but when I refresh the browser or do anything, it skips right past the breakpoint. Completely useless. If I fix the error, stop debuggin, start debugging again, try setting a breakpoint, I get a popup error saying "Could not resolve breakpoint". So basically, I've tried everything mentioned in this issue and still nothing works for me. |
@joezimjs Please provide sample project and path where to place it on localhost. I can't find bugs by description only. I need to test something. PS I have fixed some issues with setting breakpoints on ST3 branch today. |
https://github.com/joe-zim-javascript-blog/ButlerBoss is the project |
Ok I have fixed path issue, now file mapping working fine. Where to try set breakpoint? |
I was just trying to set it in the main.js file. |
On what line? If on 8 line, there I have Exception and Javascript just falling and breakpoints not work here. But in new version I made a new property "pause_on_exceptions" and it set to "uncaught" if you have uncaught exception debugger will pause there |
Set a breakpoint anywhere that would normally work. If it works, great; if it doesn't then we'll have to figure it out. |
Is your latest version available through the Package Installer? |
Yes, you use sublime 3? |
No I'm on Sublime 2 |
Right now I'm getting this in the console: [14268:11872:0321/074231:ERROR:external_registry_loader_win.cc(104)] File C:\Program Files (x86)\OApps\chromeaddon.crx for key Software\Google\Chrome\Extensions\kincjchfokkeneeofpeefomkikfkiedl does not exist or is not readable. |
That's just after trying to start Chrome. Nothing really works after that. |
I have changed path from version to branch need to wait until wbond package manager reload package. |
Try to remove package and install it again now. |
Still getting [5200:13428:0321/093815:ERROR:external_registry_loader_win.cc(104)] File C:\Program Files (x86)\OApps\chromeaddon.crx for key Software\Google\Chrome\Extensions\kincjchfokkeneeofpeefomkikfkiedl does not exist or is not readable. |
This is not a problem if Chrome started correctly and working |
Also today I have fixed some line number issues and seems it work fine on your project. |
Hi, I've installed this extension "Web Inspector 3" today and am having issues with setting break points (all other features seem to work). I'm on Mac OSX 10.8.3 I've updated the path in "Settings - User" (as I wasn't able to change the setting in the Default for some reason?) to...
Note: I've since gone back to "Settings - User" and it has changed itself to look like this...
...notice the extra "breaks" property? My set-up is as follows... index.html file which links to a JavaScript file (both in a /debug/ folder in my localhost directory). The content of my JavaScript file is... var testing = (function() {
counter = 0;
return function() {
console.log(counter);
counter++;
}
}());
window.setInterval(testing, 5000); My localhost directory is found here: /Library/WebServer/Documents So to begin with, within ST3 I run: Cmd+Shift+R and select the option "Start Google Chrome with remote debug port 2222" I then see the following error...
I then run Cmd+Shift+R again and this time I choose the option "Add/Remove Breakpoint". My cursor is already on line 6 which is where I wanted to add a break point ( I then switch over to Chrome Canary and manually enter the URL http://localhost/debug/ I then switch back to ST3 and run Cmd+Shift+R again and this time I choose the option "Start debugging" which displays "http://localhost/debug/" in the list. I select the URL and the inspector within ST3 starts showing me the logging information from my script but doesn't actually break on the breakpoint at all? I then find I can't add another breakpoint unless I stop debugging first. Any ideas on what the issue might be? Thanks. |
Same here. Everything works except for breakpoints. If I set a breakpoint (even for a simple HTML file and script), absolutely nothing happens. |
@Integralist run "Show file mapping" command and post result here please |
@sokolovstas OK first thing worth noting is that I've retried the above steps on my work laptop (same OS version but it's a 2012 retina macbook, where as above I was testing at home on a 2009 17" macbook pro) but this time I didn't get the error...
...but it still doesn't pause on the break points (thought I'd just let you know in case that error no longer showing was important or not). I ran the |
If mapping is empty no file connected from url to your local file systems. All errors on chrome start doesn't mater! What is your js file url and which folder you add to sublime? |
I've just checked the "Settings - User" file again (remember for now I'm testing this on my 2012 macbook) and the file changed to... "breaks":
{
"/Users/markmcdonnell/Desktop/test.js":
{
"6":
{
"status": "disabled"
}
}
} ...it now shows my test javascript file. I copied the files to my Desktop and in Chrome manually opened the index.html I copied there |
You need to add foder to sublime project. Open file do nothing. Plugin search for file to map only in project folders |
@sokolovstas ok I created a project file See the following image as an example... |
Does chrome developer tools show this var? |
@sokolovstas Chrome dev tools can access the |
Counter is still global in this case, as you did not declare it using |
^ |
@sokolovstas aha! cracked it. thanks -> sorry I didn't realise I hadn't declared Yes, now that I have declared the variable I can see the breakpoint shows a Thanks for the help! |
I didn't want to open another Issue just for this one question: |
You can try it and share you thoughts. |
@sokolovstas i want to add a breakpoint but my panel only show two choices one is start debugging the other one is toggle breakpoint .there's no add or delete breakpoint option and when i choose the toggle breakpoint it add one breakpoint which status is disabled |
Can you please open Sublime, repro the problem, then attach the entire content of the console window (Ctrl-`) to this issue. Let me know the URL and filename that this relates to. The problem is most likely that it hasn't successfully mapped your local file to your served file. The diagnostics in the console window will tell us. |
hello Dan Moseley i have replyed u on github . this is the picture i On Wed, Jan 6, 2016 at 1:16 AM, Dan Moseley [email protected]
Angelkuga |
Can you please copy the text out of the console and share all of it? It's the black and white region at the bottom of your picture. |
i copy the console text in a file you can open it and see On Wed, Jan 13, 2016 at 11:09 AM, Dan Moseley [email protected]
Angelkuga DPI scale: 1 |
and a notice that in the end it says "Found no local match" but i don't On Wed, Jan 13, 2016 at 1:22 PM, Kuga Angel [email protected] wrote:
Angelkuga |
@Angelkuga I think it got cut off. Can you paste the full thing on https://gist.github.com/ and share the link? ====Notified of url http://my.stuff/foo/index.html === This means that the browser (Chrome) told it that the web page used a file at URL http://my.stuff/foo/index.html. Then Web Inspector needs to figure out what local file this is -- what file it is in Sublime. For example you might have the file e:\abc\def\index.html open in Sublime. It will make lots of guesses, comparing different substrings of the URL and the files and folders you have open in Sublime. It does not look at the file content. In this example you want it to figure out that http://my.stuff/foo/index.html is the same thing as e:\abc\def\index.html . It will say "Matched e:\abc\def\index.html" for example. Does it make this match? |
One possible problem is that the file name is not included in the URL. For example if you're navigating to "http://foo.com/bar" and the server returns a file named index.html, Web Inspector will not know that the two refer to the same thing. To fix that, Web Inspector would need to be able to read custom mappings out of a configuration file. Do you want to offer a pull request? |
I can get chrome to open and start debugging and I have the console working, but when I try to add a breakpoint nothing happens.
I have the following errors in the bottom console window:
[4560:2672:0318/093557:ERROR:connection.cc(730)] sqlite error 19, errno -2: PRIMARY KEY must be unique
[4560:6612:0318/093602:ERROR:textfield.h(162)] NOT IMPLEMENTED
Thanks for your hard work, this could potentially be hugely useful.
The text was updated successfully, but these errors were encountered: