GithubHelp home page GithubHelp logo

Comments (2)

Enerccio avatar Enerccio commented on July 29, 2024

Here is result of my issue in my python generator:

def _determine_root_factory(data):
    if data["type"] == "request" and data["command"] == "variables":
        return DAPVariablesRequest
    if data["type"] == "request" and data["command"] == "threads":
        return DAPThreadsRequest
    if data["type"] == "event" and data["event"] == "thread":
        return DAPThreadEvent
    if data["type"] == "event" and data["event"] == "terminated":
        return DAPTerminatedEvent
    if data["type"] == "request" and data["command"] == "terminateThreads":
        return DAPTerminateThreadsRequest
    if data["type"] == "request" and data["command"] == "terminate":
        return DAPTerminateRequest
    if data["type"] == "event" and data["event"] == "stopped":
        return DAPStoppedEvent
    if data["type"] == "request" and data["command"] == "stepOut":
        return DAPStepOutRequest
    if data["type"] == "request" and data["command"] == "stepInTargets":
        return DAPStepInTargetsRequest
    if data["type"] == "request" and data["command"] == "stepIn":
        return DAPStepInRequest
    if data["type"] == "request" and data["command"] == "stepBack":
        return DAPStepBackRequest
    if data["type"] == "request" and data["command"] == "stackTrace":
        return DAPStackTraceRequest
    if data["type"] == "request" and data["command"] == "source":
        return DAPSourceRequest
    if data["type"] == "request" and data["command"] == "setVariable":
        return DAPSetVariableRequest
    if data["type"] == "request" and data["command"] == "setStepGranularity":
        return DAPSetStepGranularityRequest
    if data["type"] == "request" and data["command"] == "setFunctionBreakpoints":
        return DAPSetFunctionBreakpointsRequest
    if data["type"] == "request" and data["command"] == "setExpression":
        return DAPSetExpressionRequest
    if data["type"] == "request" and data["command"] == "setExceptionBreakpoints":
        return DAPSetExceptionBreakpointsRequest
    if data["type"] == "request" and data["command"] == "setDataBreakpoints":
        return DAPSetDataBreakpointsRequest
    if data["type"] == "request" and data["command"] == "setBreakpoints":
        return DAPSetBreakpointsRequest
    if data["type"] == "request" and data["command"] == "scopes":
        return DAPScopesRequest
    if data["type"] == "request" and data["command"] == "runInTerminal":
        return DAPRunInTerminalRequest
    if data["type"] == "request" and data["command"] == "reverseContinue":
        return DAPReverseContinueRequest
    if data["type"] == "request" and data["command"] == "restart":
        return DAPRestartRequest
    if data["type"] == "request" and data["command"] == "restartFrame":
        return DAPRestartFrameRequest
    if data["type"] == "event" and data["event"] == "process":
        return DAPProcessEvent
    if data["type"] == "request" and data["command"] == "pause":
        return DAPPauseRequest
    if data["type"] == "event" and data["event"] == "output":
        return DAPOutputEvent
    if data["type"] == "request" and data["command"] == "next":
        return DAPNextRequest
    if data["type"] == "request" and data["command"] == "modules":
        return DAPModulesRequest
    if data["type"] == "event" and data["event"] == "module":
        return DAPModuleEvent
    if data["type"] == "request" and data["command"] == "loadedSources":
        return DAPLoadedSourcesRequest
    if data["type"] == "event" and data["event"] == "loadedSource":
        return DAPLoadedSourceEvent
    if data["type"] == "response" and data["command"] == "launch":
        return DAPLaunchResponse
    if data["type"] == "request" and data["command"] == "launch":
        return DAPLaunchRequest
    if data["type"] == "event" and data["event"] == "initialized":
        return DAPInitializedEvent
    if data["type"] == "request" and data["command"] == "initialize":
        return DAPInitializeRequest
    if data["type"] == "request" and data["command"] == "gotoTargets":
        return DAPGotoTargetsRequest
    if data["type"] == "request" and data["command"] == "goto":
        return DAPGotoRequest
    if data["type"] == "event" and data["event"] == "exited":
        return DAPExitedEvent
    if data["type"] == "request" and data["command"] == "exceptionInfo":
        return DAPExceptionInfoRequest
    if data["type"] == "request" and data["command"] == "evaluate":
        return DAPEvaluateRequest
    if data["type"] == "request" and data["command"] == "disconnect":
        return DAPDisconnectRequest
    if data["type"] == "request" and data["command"] == "dataBreakpointInfo":
        return DAPDataBreakpointInfoRequest
    if data["type"] == "event" and data["event"] == "continued":
        return DAPContinuedEvent
    if data["type"] == "request" and data["command"] == "continue":
        return DAPContinueRequest
    if data["type"] == "request" and data["command"] == "configurationDone":
        return DAPConfigurationDoneRequest
    if data["type"] == "request" and data["command"] == "completions":
        return DAPCompletionsRequest
    if data["type"] == "event" and data["event"] == "capabilities":
        return DAPCapabilitiesEvent
    if data["type"] == "event" and data["event"] == "breakpoint":
        return DAPBreakpointEvent
    if data["type"] == "request" and data["command"] == "attach":
        return DAPAttachRequest
    if data["type"] == "response":
        return DAPVariablesResponse
    if data["type"] == "response":
        return DAPThreadsResponse
    if data["type"] == "response":
        return DAPTerminateThreadsResponse
    if data["type"] == "response":
        return DAPTerminateResponse
    if data["type"] == "response":
        return DAPStepOutResponse
    if data["type"] == "response":
        return DAPStepInTargetsResponse
    if data["type"] == "response":
        return DAPStepInResponse
    if data["type"] == "response":
        return DAPStepBackResponse
    if data["type"] == "response":
        return DAPStackTraceResponse
    if data["type"] == "response":
        return DAPSourceResponse
    if data["type"] == "response":
        return DAPSetVariableResponse
    if data["type"] == "response":
        return DAPSetStepGranularityResponse
    if data["type"] == "response":
        return DAPSetFunctionBreakpointsResponse
    if data["type"] == "response":
        return DAPSetExpressionResponse
    if data["type"] == "response":
        return DAPSetExceptionBreakpointsResponse
    if data["type"] == "response":
        return DAPSetDataBreakpointsResponse
    if data["type"] == "response":
        return DAPSetBreakpointsResponse
    if data["type"] == "response":
        return DAPScopesResponse
    if data["type"] == "response":
        return DAPReverseContinueResponse
    if data["type"] == "response":
        return DAPRestartResponse
    if data["type"] == "response":
        return DAPRestartFrameResponse
    if data["type"] == "response":
        return DAPPauseResponse
    if data["type"] == "response":
        return DAPNextResponse
    if data["type"] == "response":
        return DAPModulesResponse
    if data["type"] == "response":
        return DAPLoadedSourcesResponse
    if data["type"] == "response":
        return DAPGotoTargetsResponse
    if data["type"] == "response":
        return DAPGotoResponse
    if data["type"] == "response":
        return DAPExceptionInfoResponse
    if data["type"] == "response":
        return DAPEvaluateResponse
    if data["type"] == "response":
        return DAPDisconnectResponse
    if data["type"] == "response":
        return DAPDataBreakpointInfoResponse
    if data["type"] == "response":
        return DAPContinueResponse
    if data["type"] == "response":
        return DAPCompletionsResponse
    if data["type"] == "response":
        return DAPAttachResponse
    raise ValueError("unknown entity to factory binding " + str(data))

as you can see there are too many duplicates and it is impossible to determine from pure JSON message what that message is about :(

from debug-adapter-protocol.

Enerccio avatar Enerccio commented on July 29, 2024

I renamed it because it is issue with every single response. It's impossible to generate at compile time mapping from unknown json to response.

from debug-adapter-protocol.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.