Steps to setup a DFDL schema project for use with the VSCode Extension:
- Setup the main project (the final assembly of all schema components) to create a lib_managed directory - Checkout (git) all project repositories to a location where they share a common parent. - Put all src/main/resources locations from all projects on the daffodil debug classpath in the launch.json. - These entries should be first on the daffodil debug classpath. All subsequent additions of jar files must come AFTER these src/main/resources entries. - Any project that creates a jar (for a layer, UDF, or charset) the jar must also go on the daffodil debug classpath in launch.json - Doing sbt test in the main project will populate lib_managed with all the required jars. - This command will define DAFFODIL_CLASSPATH to have every required jar (and then some). - export DAFFODIL_CLASSPATH=$(sbt -batch -error "export fullClasspath") - You can then massage this, with an editor, into a form suitable to use as added entries in the daffodil debug classpath in launch.json. - This ensures you have all jars, but many of these are not necessary (you can remove any jars except the jars for the layers, UDFs, or charsets.) - The resulting classpath must include all src/main/resources for all schema components, and the jars for any layers, UDFs, or charsets. - The main project must have a schema you can point at, and it must be under src/main/resources. - (any schema files under src/test/resources implies those directories also must appear on the daffodil debug classpath - Schemas cannot be pre-compiled, so at the start of each run the DFDL schema will be compiled. This can take over 1 minute for large DFDL schemas. I used the above to create a launch.json and workspace for the VSCode Extension for DFDL to debug the envelope-payload example on DFDLSchemas. This involves these 5 git projects all of which are on the github DFDLSchemas site: - envelope-payload - tcpMessage - mil-std-2045 - PCAP - ethernetIP The ethernetIP project creates a layer plugin (to compute IPv4 checksums). This PR includes the launch.json for these schemas: https://github.com/DFDLSchemas/envelope-payload/pull/5 Mike Beckerle Apache Daffodil PMC | daffodil.apache.org OGF DFDL Workgroup Co-Chair | www.ogf.org/ogf/doku.php/standards/dfdl/dfdl Owl Cyber Defense | www.owlcyberdefense.com