Business background
using vue+webpack to develop official account
- Local server started
localhost:8080
for development and debugging - data is obtained from remote url
www.test.com
- after directly disabling the cross-domain of
chorme
locally, you can debug locally
problem description
but when I need to call Wechat-related interfaces, I must debug
under Wechat developer tool
, but Wechat developer tool
does not set cross-domain function
, so I will report an error
localhost:8080
to get remote www.test.com
interface data.
the environmental background of the problems and what methods you have tried
- try to download
QQ Browser
it is said that there is a Wechat debugging tool, but can not find - Native
hosts
mapping, but mapping always fails
related codes
/ / Please paste the code text below (do not replace the code with pictures)
what result do you expect? What is the error message actually seen?
how can I debug remotely locally without uploading the front-end code to a remote server?
solve
- right-click developer tool shortcuts-> Click Properties
- Click Shortcut-> Click destination
-- args-- disable-web-security-- user-data-dir
paste this line of code after the path- reopen developer tools, and cross-domain problems will be eliminated