]> lifelog.hopto.org Git - PerlCNF.git/commitdiff
Added debugging howto instructions for vscode editor.
authorWill Budic <redacted>
Tue, 25 Jun 2024 02:09:20 +0000 (12:09 +1000)
committerWill Budic <redacted>
Tue, 25 Jun 2024 02:09:20 +0000 (12:09 +1000)
tests/template_for_new_test.pl

index dc7d27a7318959b56a9c5a9c48afe097ddafea69..3e5e440676c767fd67e937fa4827a812fb4cb636 100644 (file)
@@ -1,10 +1,27 @@
 #!/usr/bin/env perl
-use warnings; use strict; 
+use warnings; use strict;
 use Syntax::Keyword::Try;
 #no critic "eval"
-use lib "./tests";
-use lib "./local";
-use lib "./system/modules";
+
+###
+# To debug in vscode you need the extension LanguageServer and Debuger by Gerald Richter
+# the optional Perl Navigator uses also the LanguagerServer but isn't one.
+# To debug in vs code the following local use lib ... have to be commented out.
+# Do not forget to uncoment them when commiting or using outside of vscode.
+# Setup settings.json now too.
+#
+# Here is LanguageServer settings example for settings.json
+# requires full paths for Gerald's extension because it is dumb to reslove this.
+#
+# "perl.perlInc": [
+#     "/home/will/dev_new/PerlCNF/tests",
+#     "/home/will/dev_new/PerlCNF/system/modules"
+# ]
+# After that disable all the followin use lib ... statements:
+###
+use lib "tests";
+use lib "local";
+use lib "system/modules";
 
 require TestManager;
 my $test = TestManager -> new($0);
@@ -16,16 +33,16 @@ try{
     #
     die $test->failed() if not $cnf = CNFParser->new();
     $test->case("Passed new instance CNFParser.");
-    #  
+    #
     $test-> nextCase();
-    #   
+    #
 
-    #   
-    $test->done();    
+    #
+    $test->done();
     #
 }
-catch{ 
-   $test -> dumpTermination($@);   
+catch{
+   $test -> dumpTermination($@);
    $test -> doneFailed();
 }