function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kibwe Williamson 11Kibwe Williamson 11 

Salesforce lightning is switching to classic when the Google Chrome Web inspector is opened

When trying to do some debugging in lightning Salesforce keeps switching to classic view whenever I open the inspector. I'm getting this error in the Inspector console:
DevTools failed to load SourceMap: Could not load content for https://hgv--qa.lightning.force.com/javascript/1515605724000/ui-sfdc-javascript-impl/source/RecordGVP.js.map: 
Best Answer chosen by Kibwe Williamson 11
vishal-negandhivishal-negandhi

Hi Kibwe, 

 

This will usually happen when your "Toggle Device Toolbar" is turned on, and the reason being lightning experience not available on mobile browsers. If your device toolbar is switched on, means you're on the mobile browser mode and hence you go back to classic. 

Turn the toggle off and then try debugging in web inspector and it should work fine. 

 

I hope this helps.

All Answers

VinayVinay (Salesforce Developers) 
HI Kibwe,

Generally, we see this error occurs whenever you are trying to load the data which is not available on the public server.  Can you re-check?

Thanks,
vishal-negandhivishal-negandhi

Hi Kibwe, 

 

This will usually happen when your "Toggle Device Toolbar" is turned on, and the reason being lightning experience not available on mobile browsers. If your device toolbar is switched on, means you're on the mobile browser mode and hence you go back to classic. 

Turn the toggle off and then try debugging in web inspector and it should work fine. 

 

I hope this helps.

This was selected as the best answer
Kibwe Williamson 11Kibwe Williamson 11
Thank you that was the problem.
vishal-negandhivishal-negandhi

Kindly mark the answer as Best answer to help others having the same problem. 

Cheers!

Kibwe Williamson 11Kibwe Williamson 11
Follow up. The application runs on an actual IPad, but not on the IPad emulator. How can I get it to run on the emulator so I can troubleshoot?
Jarrad BaileyJarrad Bailey
I am also having this issue. It runs fine on an actual iPad using Safari. However, using the 'Toggle Mobile Device' feature in Chrome on my PC, instantly switches Salesforce to Classic. Any advice on how to fix this?
FinnArildMusicFinnArildMusic
This is suddenly happening to me too. I'm sure it did not do this - only the previous week.
Patrick EngelhardtPatrick Engelhardt
In case you have the same issue and actually do need the device toolbar for testing the responsiveness of your Salesforce Lightning app, here's how you can make it work by telling Salesforce, that you are on a desktop instead of a mobile device:
How to make Chrome Dev-Tools device tab to report as a desktop device 
Serife KaratasSerife Karatas
I had the same problem going on for a week and solved by turning off  'Toggle Mobile Device'. thank you
Ramrezu MukherjeeRamrezu Mukherjee

Shortcut for Google Chrome:   CTRL + SHIFT + M to turn on/Off the Toggle Device Tool, Thanks. Please Mark as best answer if it works.