- This topic has 1 reply, 2 voices, and was last updated 7 years, 5 months ago by support-swapna.
-
AuthorPosts
-
Fedor LosevParticipantThere are many cases of code where breakpoint fails in chromium SDK with ‘No enum constant ScopeValue.Type.BLOCK’.
This makes the Webclipse TS/JS debugger almost useless and we have to use chrome dev tools instead.
Here is some code that reproduces the problem (it can happen in various cases)
export class TestClass { constructor() { } somemethod(param: any = '') { console.log(param); //put breakpoint here const x = 1; return ''; } } const test = new TestClass(); test.somemethod('1');
If one puts a breakpoint on console line, the debugger fails with the error given below. Moreover, it also pauses the page so one has to reload, it is not possible to continue.
If either
param: any = ''
is changed toparam: any
orconst x = 1;
line is removed, the breakpoint works properly.Full trace of the error from Eclipse log:
java.lang.RuntimeException: org.chromium.sdk.internal.protocolparser.JsonProtocolParseException: Failed to parse type org.chromium.sdk.internal.wip.protocol.input.debugger.PausedEventData at org.chromium.sdk.internal.wip.WipCommandProcessor$EventMap$InternalHandler.handle(WipCommandProcessor.java:344) at org.chromium.sdk.internal.wip.WipCommandProcessor$EventMap.handleEvent(WipCommandProcessor.java:317) at org.chromium.sdk.internal.wip.WipCommandProcessor.processEvent(WipCommandProcessor.java:147) at org.chromium.sdk.internal.wip.WipCommandProcessor.access$3(WipCommandProcessor.java:139) at org.chromium.sdk.internal.wip.WipCommandProcessor$WipMessageTypeHandler.acceptNonSeq(WipCommandProcessor.java:201) at org.chromium.sdk.internal.wip.WipCommandProcessor$WipMessageTypeHandler.acceptNonSeq(WipCommandProcessor.java:1) at org.chromium.sdk.internal.BaseCommandProcessor.processIncoming(BaseCommandProcessor.java:110) at org.chromium.sdk.internal.wip.WipCommandProcessor.acceptResponse(WipCommandProcessor.java:132) at org.chromium.sdk.internal.wip.WipTabImpl$2.textMessageRecieved(WipTabImpl.java:113) at org.chromium.sdk.internal.websocket.Hybi17WsConnection$IncomingFrameHandler$1$1.dispatch(Hybi17WsConnection.java:292) at org.chromium.sdk.internal.websocket.AbstractWsConnection$8.runImpl(AbstractWsConnection.java:155) at org.chromium.sdk.internal.websocket.AbstractWsConnection$8.run(AbstractWsConnection.java:146) at java.lang.Thread.run(Unknown Source) Caused by: org.chromium.sdk.internal.protocolparser.JsonProtocolParseException: Failed to parse type org.chromium.sdk.internal.wip.protocol.input.debugger.PausedEventData at org.chromium.sdk.internal.protocolparser.dynamicimpl.TypeHandler.parse(TypeHandler.java:140) at org.chromium.sdk.internal.protocolparser.dynamicimpl.TypeHandler$AbsentSubtypeAspect.parseFromSuper(TypeHandler.java:252) at org.chromium.sdk.internal.protocolparser.dynamicimpl.TypeHandler.parseRootImpl(TypeHandler.java:150) at org.chromium.sdk.internal.protocolparser.dynamicimpl.TypeHandler.parseRoot(TypeHandler.java:145) at org.chromium.sdk.internal.protocolparser.dynamicimpl.ParserRootImpl$ParseDelegate.invoke(ParserRootImpl.java:173) at org.chromium.sdk.internal.protocolparser.dynamicimpl.ParserRootImpl$InvocationHandlerImpl.invoke(ParserRootImpl.java:145) at com.sun.proxy.$Proxy47.parseDebuggerPausedEventData(Unknown Source) at org.chromium.sdk.internal.wip.protocol.input.debugger.PausedEventData$1.parse(PausedEventData.java:31) at org.chromium.sdk.internal.wip.protocol.input.debugger.PausedEventData$1.parse(PausedEventData.java:1) at org.chromium.sdk.internal.wip.WipCommandProcessor$EventMap$InternalHandler.handle(WipCommandProcessor.java:342) ... 12 more Caused by: org.chromium.sdk.internal.protocolparser.JsonProtocolParseException: Failed to parse field callFrames at org.chromium.sdk.internal.protocolparser.dynamicimpl.FieldLoader.parse(FieldLoader.java:40) at org.chromium.sdk.internal.protocolparser.dynamicimpl.TypeHandler.parse(TypeHandler.java:119) ... 21 more Caused by: org.chromium.sdk.internal.protocolparser.JsonProtocolParseException: Failed to parse type org.chromium.sdk.internal.wip.protocol.input.debugger.CallFrameValue at org.chromium.sdk.internal.protocolparser.dynamicimpl.TypeHandler.parse(TypeHandler.java:140) at org.chromium.sdk.internal.protocolparser.dynamicimpl.TypeHandler$AbsentSubtypeAspect.parseFromSuper(TypeHandler.java:252) at org.chromium.sdk.internal.protocolparser.dynamicimpl.TypeHandler.parseRootImpl(TypeHandler.java:150) at org.chromium.sdk.internal.protocolparser.dynamicimpl.JsonTypeParser.parseValue(JsonTypeParser.java:50) at org.chromium.sdk.internal.protocolparser.dynamicimpl.JsonTypeParser.parseValue(JsonTypeParser.java:1) at org.chromium.sdk.internal.protocolparser.dynamicimpl.DynamicParserImpl$ArrayParser$1.create(DynamicParserImpl.java:1199) at org.chromium.sdk.internal.protocolparser.dynamicimpl.DynamicParserImpl$ArrayParser.parseValue(DynamicParserImpl.java:1365) at org.chromium.sdk.internal.protocolparser.dynamicimpl.DynamicParserImpl$ArrayParser.parseValue(DynamicParserImpl.java:1) at org.chromium.sdk.internal.protocolparser.dynamicimpl.FieldLoader.parse(FieldLoader.java:38) ... 22 more Caused by: org.chromium.sdk.internal.protocolparser.JsonProtocolParseException: Failed to parse field scopeChain at org.chromium.sdk.internal.protocolparser.dynamicimpl.FieldLoader.parse(FieldLoader.java:40) at org.chromium.sdk.internal.protocolparser.dynamicimpl.TypeHandler.parse(TypeHandler.java:119) ... 30 more Caused by: org.chromium.sdk.internal.protocolparser.JsonProtocolParseException: Failed to parse type org.chromium.sdk.internal.wip.protocol.input.debugger.ScopeValue at org.chromium.sdk.internal.protocolparser.dynamicimpl.TypeHandler.parse(TypeHandler.java:140) at org.chromium.sdk.internal.protocolparser.dynamicimpl.TypeHandler$AbsentSubtypeAspect.parseFromSuper(TypeHandler.java:252) at org.chromium.sdk.internal.protocolparser.dynamicimpl.TypeHandler.parseRootImpl(TypeHandler.java:150) at org.chromium.sdk.internal.protocolparser.dynamicimpl.JsonTypeParser.parseValue(JsonTypeParser.java:50) at org.chromium.sdk.internal.protocolparser.dynamicimpl.JsonTypeParser.parseValue(JsonTypeParser.java:1) at org.chromium.sdk.internal.protocolparser.dynamicimpl.DynamicParserImpl$ArrayParser$1.create(DynamicParserImpl.java:1199) at org.chromium.sdk.internal.protocolparser.dynamicimpl.DynamicParserImpl$ArrayParser.parseValue(DynamicParserImpl.java:1365) at org.chromium.sdk.internal.protocolparser.dynamicimpl.DynamicParserImpl$ArrayParser.parseValue(DynamicParserImpl.java:1) at org.chromium.sdk.internal.protocolparser.dynamicimpl.FieldLoader.parse(FieldLoader.java:38) ... 31 more Caused by: org.chromium.sdk.internal.protocolparser.JsonProtocolParseException: Failed to parse field 'type' in type org.chromium.sdk.internal.wip.protocol.input.debugger.ScopeValue at org.chromium.sdk.internal.protocolparser.dynamicimpl.DynamicParserImpl$LazyParseFieldMethodHandler.parse(DynamicParserImpl.java:722) at org.chromium.sdk.internal.protocolparser.dynamicimpl.DynamicParserImpl$LazyParseFieldMethodHandler.parse(DynamicParserImpl.java:713) at org.chromium.sdk.internal.protocolparser.dynamicimpl.DynamicParserImpl$LazyParseFieldMethodHandler.parseEager(DynamicParserImpl.java:701) at org.chromium.sdk.internal.protocolparser.dynamicimpl.DynamicParserImpl$EagerFieldParserImpl.parseAllFields(DynamicParserImpl.java:659) at org.chromium.sdk.internal.protocolparser.dynamicimpl.TypeHandler.parse(TypeHandler.java:135) ... 39 more Caused by: org.chromium.sdk.internal.protocolparser.JsonProtocolParseException: Failed to call valueOf method at org.chromium.sdk.internal.protocolparser.dynamicimpl.EnumParser.parseValueQuick(EnumParser.java:58) at org.chromium.sdk.internal.protocolparser.dynamicimpl.EnumParser.parseValueQuick(EnumParser.java:1) at org.chromium.sdk.internal.protocolparser.dynamicimpl.DynamicParserImpl$LazyParseFieldMethodHandler.parse(DynamicParserImpl.java:720) ... 43 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.chromium.sdk.internal.protocolparser.dynamicimpl.EnumParser.parseValueQuick(EnumParser.java:52) ... 45 more Caused by: java.lang.IllegalArgumentException: No enum constant org.chromium.sdk.internal.wip.protocol.input.debugger.ScopeValue.Type.BLOCK at java.lang.Enum.valueOf(Unknown Source) at org.chromium.sdk.internal.wip.protocol.input.debugger.ScopeValue$Type.valueOf(ScopeValue.java:1) ... 49 more
- This topic was modified 7 years, 5 months ago by Fedor Losev.
support-swapnaModeratorFedor,
Thank you for the detailed explanation. I have filed it for further investigation with the dev team. We will come back to you if we need more details.
Sorry for inconvenience caused.
–Swapna
MyEclipse Support -
AuthorPosts