I've also had a lot of issues pasting VS code into dev tools. The biggest issue I've found is DevTools doesn't support let and const. These all have to be replaced with var. Unfortunately re-scoping variables like this can have some adverse side effects.
Not sure this is your issue but worth a look.