Giter Club home page Giter Club logo

debug_adapter's People

Contributors

eshelyaron avatar jamesnvc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

debug_adapter's Issues

Windows compatibility

The debug_adapter currently relies on at least two features that are not available on Windows:

  1. wait_for_input/3 on none-socket streams (stdin specifically)
  2. Setting the encoding of the stdio streams - this may not actually be needed on Windows

The first problem can be solved by using an extra thread to wait on stdin and relay DAP messages to server via thread_send_message/2. In this solution, the server handler thread stops using wait_for_input/3 altogether and only handles messages from the thread message queue.

A draft for adding Windows compatibility can be found in #39, it currently just gets the tests running on Windows during CI.

How to install debug adapter

I'm trying to install but it fails:

λ swipl -g "pack_install(debug_adapter)" -t halt                                                                                                          
% Contacting server at https://www.swi-prolog.org/pack/query ... ok                                       
Install [email protected] from https://github.com/eshelyaron/debug_adapter/releases/download/v0.2.5/debug_adapter-0.2.5.zip Y/n?                             
                                                                                                        
% Contacting server at https://www.swi-prolog.org/pack/query ... ok                                                                   
% "debug_adapter-0.2.5.zip" was downloaded 6 times                                                      
Package:                debug_adapter                                                                                                 
Title:                  Debug Adapter Protocol package for SWI-Prolog                                                                 
Installed version:      0.2.5                                                                                                         
Author:                 Eshel Yaron <[email protected]>                                                                       
Maintainer:             Eshel Yaron <[email protected]>                                                                       
Packager:               Eshel Yaron <[email protected]>                                                                         
Home page:              https://github.com/eshelyaron/debug_adapter                                                                   
Download URL:           https://github.com/eshelyaron/debug_adapter/releases/download/v0.2.5/debug_adapter-0.2.5.zip                    
Install "debug_adapter-0.2.5.zip" (91,667 bytes) Y/n?                                                                                                        
% checking for swipl...                                                                                                               
% /usr/lib/swipl/bin/x86_64-linux/swipl                                                                                               
% checking for a thread-safe mkdir -p...                                                                                                                     
% /usr/bin/mkdir -p                                                           
% checking for a BSD-compatible install...                                                                                                                   
% /usr/bin/install -c                                                                                                                                        
% checking whether build environment is sane...                                                                                                                
% yes                                                                          
% checking for gawk...                                                         
% gawk                                                                         
% checking whether make sets $(MAKE)...                                        
% yes                                                                          
% checking whether make supports nested variables...                                                                                                           
% yes                                                                          
% checking that generated files are newer than configure...                                                                                                    
% done                                                                         
% configure: creating ./config.status                                          
% config.status: creating pack.pl                                              
% config.status: creating Makefile                                             
% config.status: creating prolog/Makefile                                      
% config.status: creating test/Makefile                                        
% config.status: creating test/server.plt                                      
%  cd . && /bin/sh /home/risto/.local/share/swi-prolog/pack/debug_adapter/missing automake-1.16 --foreign                                                      
ERROR: configure.ac:5: error: version mismatch.  This is Automake 1.16.5,                                                                                      
ERROR: configure.ac:5: but the definition used by this AM_INIT_AUTOMAKE                                                                                        
ERROR: configure.ac:5: comes from Automake 1.16.1.  You should recreate                                                                                        
ERROR: configure.ac:5: aclocal.m4 with aclocal and run automake again.                                                                                         
Warning: prolog/Makefile.am:2: warning: addprefix $(srcdir: non-POSIX variable name                                                                            
Warning: prolog/Makefile.am:2: (probably a GNU make extension)                                                                                                 
Warning: prolog/Makefile.am:4: warning: user target 'swipl_debug_adapter$(EXEEXT)' defined here ...                                                            
Warning: /usr/share/automake-1.16/am/program.am: ... overrides Automake target 'swipl_debug_adapter$(EXEEXT)' defined here                                     
Warning: prolog/Makefile.am:1:   while processing program 'swipl_debug_adapter'                                                                                
% WARNING: 'automake-1.16' is probably too old.                                                                                                                
%          You should only need it if you modified 'Makefile.am' or                                                                                            
%          'configure.ac' or m4 files included by 'configure.ac'.                                                                                              
%          The 'automake' program is part of the GNU Automake package:                                                                                         
%          <https://www.gnu.org/software/automake>                                                                                                             
%          It also requires GNU Autoconf, GNU m4 and Perl in order to run:                                                                                     
%          <https://www.gnu.org/software/autoconf>                                                                                                             
%          <https://www.gnu.org/software/m4/>                                                                                                                  
%          <https://www.perl.org/>                                             
% make: *** [Makefile:283: Makefile.in] Error 1                                                                                                                
ERROR: -g pack_install(debug_adapter): Process "process(path(make),[all])": exit status: 2                                                    

Is there a way to get it working without autotools?

Seperate the generic DAP logic from the (SWI-)Prolog specific semantics

Currently (v0.6.3), the implementation of the DAP specification in da_server/1 is interwoven with logic that is specific to the use case of debugging (SWI-)Prolog programs.
It seems desirable to separate these concerns into two components, say dap_server and dap_swipl, such that dap_server will implement only the generic framework for easily adapting debuggers in a manner conforming to the DAP specs, while dap_swipl will encapsulate the specifics of adapting the SWI-Prolog debugger with all of its nitty-gritty details.
This will allow for (re-)using the dap_server component for creating DAP servers for any language that is implemented on top of SWI-Prolog with minimal effort, by implementing only the logic that is specific for the target language's semantics.
Such languages include s(CASP), CHR, Logtalk and probably more.

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.