简体   繁体   中英

IDEA Failed to load resource

I want to debug my html + javascript site in IDEA and Chrome browser.

When I press 'debug' in console i got:

Failed to load resource file:///C:/js/angular.min.js

As I undestand, I need to set root path of my web site in properties. But where this option?

Such urls (site root-relative, the ones starting with slash) can't be properly resolved when opening file locally (using file:// protocol) - the browser will search for these files in your system root (C:/). You need using remote javascript debug configuration (access your html using the web server url rather than local path) to make this work. See http://wiki.jetbrains.net/intellij/Debugging_JavaScript_with_IntelliJ_IDEA#Remote_debugging for more information on remote javascript debugging in Idea

Note that Idea 12 supports so-called built-in webserver ( http://confluence.jetbrains.com/display/WI/built-in+web+server ), so you can test your code without installing a web server.

Instead of accessing from local file system try to access your html + javascript application from a web server by putting those appication files in web server.

Install XAMPP or WAMP in your system and copy your application into the htdocs folder to run that application locally.Also edit the files using IDEA from there.So,you can parallely edit using IEDA and run using XAMPP.

http://www.apachefriends.org/f/viewtopic.php?t=14173 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM