[sqlite] How to see SQLite debugging information

2015-12-10 Thread da...@andl.org
On Windows you will get a console and standard output if you are running a
console application, and otherwise not.

I think you need a simple console app to call your ActiveX DLL, or find some
other way. Windows GUI app and standard output do not play well together.

Regards
David M Bennett FACS

Andl - A New Database Language - andl.org



On 12/8/15, Bart Smissaert  wrote:
> So, what/where is that standard output channel?
> This is on a Win7 machine. How do I bring up that console window?
>

The standard output is what displays on your screen when you are in a DOS
box.

SQLite does not have any facilities for debugging in a GUI on Windows.

-- 
D. Richard Hipp
drh at sqlite.org
___
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



[sqlite] How to see SQLite debugging information

2015-12-09 Thread Bart Smissaert
> 1) Click Start etc.

That won't show the debug output.
Wish it was that simple.

> If you want to prove your dll is working (or not
> working), you should attempt to isolate it, for direct testing.

Not sure what you mean with that. I know an error occurs in sqlite3.dll and
hopefully the debug output will tell me what it is.

RBS






On Wed, Dec 9, 2015 at 6:14 PM, Adam Devita  wrote:

> "This is on a Win7 machine. How do I bring up that console window?"
>
> 1) Click Start
> 2) type cmd
> you will see cmd.exe in the list of programs to run.
> 3) click on cmd.exe
>
> To run MS-excell from the command line, you can call it from the full
> path (check version):
>
> "C:\Program Files\Microsoft Office\Office15\Excel.exe"
>
>
> I agree with David.  If you want to prove your dll is working (or not
> working), you should attempt to isolate it, for direct testing. Many
> hours of many people's lives have been wasted attempting to indirectly
> test things that have more than 1 unknown or potential source of error
>  in a chain.
>
> regards,
> Adam DeVita
>
>
> On Wed, Dec 9, 2015 at 10:12 AM, Bart Smissaert
>  wrote:
> > Will look at this, it is a VB6 console app and that may just do the job:
> > http://vb.mvps.org/samples/Console/
> >
> > RBS
> >
> > On Wed, Dec 9, 2015 at 1:03 PM,  wrote:
> >
> >> On Windows you will get a console and standard output if you are
> running a
> >> console application, and otherwise not.
> >>
> >> I think you need a simple console app to call your ActiveX DLL, or find
> >> some
> >> other way. Windows GUI app and standard output do not play well
> together.
> >>
> >> Regards
> >> David M Bennett FACS
> >>
> >> Andl - A New Database Language - andl.org
> >>
> >>
> >>
> >> On 12/8/15, Bart Smissaert  wrote:
> >> > So, what/where is that standard output channel?
> >> > This is on a Win7 machine. How do I bring up that console window?
> >> >
> >>
> >> The standard output is what displays on your screen when you are in a
> DOS
> >> box.
> >>
> >> SQLite does not have any facilities for debugging in a GUI on Windows.
> >>
> >> --
> >> D. Richard Hipp
> >> drh at sqlite.org
> >> ___
> >> sqlite-users mailing list
> >> sqlite-users at mailinglists.sqlite.org
> >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >>
> >> ___
> >> sqlite-users mailing list
> >> sqlite-users at mailinglists.sqlite.org
> >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >>
> > ___
> > sqlite-users mailing list
> > sqlite-users at mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
> --
> --
> VerifEye Technologies Inc.
> 151 Whitehall Dr. Unit 2
> Markham, ON
> L3R 9T1
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] How to see SQLite debugging information

2015-12-09 Thread Bart Smissaert
Will look at this, it is a VB6 console app and that may just do the job:
http://vb.mvps.org/samples/Console/

RBS

On Wed, Dec 9, 2015 at 1:03 PM,  wrote:

> On Windows you will get a console and standard output if you are running a
> console application, and otherwise not.
>
> I think you need a simple console app to call your ActiveX DLL, or find
> some
> other way. Windows GUI app and standard output do not play well together.
>
> Regards
> David M Bennett FACS
>
> Andl - A New Database Language - andl.org
>
>
>
> On 12/8/15, Bart Smissaert  wrote:
> > So, what/where is that standard output channel?
> > This is on a Win7 machine. How do I bring up that console window?
> >
>
> The standard output is what displays on your screen when you are in a DOS
> box.
>
> SQLite does not have any facilities for debugging in a GUI on Windows.
>
> --
> D. Richard Hipp
> drh at sqlite.org
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] How to see SQLite debugging information

2015-12-09 Thread David Bennett
On Windows you will get a console and standard output if you are running a
console application, and otherwise not.

I think you need a simple console app to call your ActiveX DLL, or find some
other way. Windows GUI app and standard output do not play well together.

Regards
David M Bennett FACS

Andl - A New Database Language - andl.org



On 12/8/15, Bart Smissaert  wrote:
> So, what/where is that standard output channel?
> This is on a Win7 machine. How do I bring up that console window?
>

The standard output is what displays on your screen when you are in a DOS
box.

SQLite does not have any facilities for debugging in a GUI on Windows.

-- 
D. Richard Hipp
drh at sqlite.org
___
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



[sqlite] How to see SQLite debugging information

2015-12-09 Thread Adam Devita
"This is on a Win7 machine. How do I bring up that console window?"

1) Click Start
2) type cmd
you will see cmd.exe in the list of programs to run.
3) click on cmd.exe

To run MS-excell from the command line, you can call it from the full
path (check version):

"C:\Program Files\Microsoft Office\Office15\Excel.exe"


I agree with David.  If you want to prove your dll is working (or not
working), you should attempt to isolate it, for direct testing. Many
hours of many people's lives have been wasted attempting to indirectly
test things that have more than 1 unknown or potential source of error
 in a chain.

regards,
Adam DeVita


On Wed, Dec 9, 2015 at 10:12 AM, Bart Smissaert
 wrote:
> Will look at this, it is a VB6 console app and that may just do the job:
> http://vb.mvps.org/samples/Console/
>
> RBS
>
> On Wed, Dec 9, 2015 at 1:03 PM,  wrote:
>
>> On Windows you will get a console and standard output if you are running a
>> console application, and otherwise not.
>>
>> I think you need a simple console app to call your ActiveX DLL, or find
>> some
>> other way. Windows GUI app and standard output do not play well together.
>>
>> Regards
>> David M Bennett FACS
>>
>> Andl - A New Database Language - andl.org
>>
>>
>>
>> On 12/8/15, Bart Smissaert  wrote:
>> > So, what/where is that standard output channel?
>> > This is on a Win7 machine. How do I bring up that console window?
>> >
>>
>> The standard output is what displays on your screen when you are in a DOS
>> box.
>>
>> SQLite does not have any facilities for debugging in a GUI on Windows.
>>
>> --
>> D. Richard Hipp
>> drh at sqlite.org
>> ___
>> sqlite-users mailing list
>> sqlite-users at mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>>
>> ___
>> sqlite-users mailing list
>> sqlite-users at mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>>
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



-- 
--
VerifEye Technologies Inc.
151 Whitehall Dr. Unit 2
Markham, ON
L3R 9T1


[sqlite] How to see SQLite debugging information

2015-12-09 Thread Dominique Devienne
On Wed, Dec 9, 2015 at 12:59 PM, Graham Holden 
wrote:

> If you have, or create, a VB6 standalone EXE that calls SQLite, you should
> be possible to get it to show stdout/stderr.
>

OP already explained VB code is wrapped in an ActiveX dynamically
used/loaded by MS Excel.

So no user-controlled EXE, and chances that EDITBIN /SUBSYSTEM:CONSOLE
works on the host EXE (Excel) are uncertain at best.

So in the case of a 3rd party host EXE, beside SQLite itself allowing to
redirect it's output to a file, via a pragma (ideally) or an new API or
config in init() [1], I don't see any solution. --DD

[1] https://www.sqlite.org/c3ref/initialize.html


[sqlite] How to see SQLite debugging information

2015-12-09 Thread Bart Smissaert
If all else fails it would be no problem to write a little VB6 exe that
calls the ActiveX dll.
Not much code should be needed in that to reproduce that crash situation.
Would something like the free DOSBox do the job? Will try later.

RBS



On Wed, Dec 9, 2015 at 12:12 PM, Dominique Devienne 
wrote:

> On Wed, Dec 9, 2015 at 12:59 PM, Graham Holden 
> wrote:
>
> > If you have, or create, a VB6 standalone EXE that calls SQLite, you
> should
> > be possible to get it to show stdout/stderr.
> >
>
> OP already explained VB code is wrapped in an ActiveX dynamically
> used/loaded by MS Excel.
>
> So no user-controlled EXE, and chances that EDITBIN /SUBSYSTEM:CONSOLE
> works on the host EXE (Excel) are uncertain at best.
>
> So in the case of a 3rd party host EXE, beside SQLite itself allowing to
> redirect it's output to a file, via a pragma (ideally) or an new API or
> config in init() [1], I don't see any solution. --DD
>
> [1] https://www.sqlite.org/c3ref/initialize.html
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] How to see SQLite debugging information

2015-12-09 Thread Graham Holden
If you have, or create, a VB6 standalone EXE that calls SQLite, you should be 
possible to get it to show stdout/stderr.

By default, such EXEs are marked as "GUI" programs: if launched from a command 
prompt, the prompt returns immediately and they don't have a "console".

However, you can change the way an EXE is launched. ?It might be possible to 
choose the mode when you first create the project (you can in later versions of 
DevStudio; I can't remember if VB6 has this option). If you can't choose (or 
you have an existing project) you can use a Microsoft utility called EDITBIN:

EDITBIN /SUBSYSTEM:CONSOLE MYVB6.EXE

should switch the mode. ?If launched from a command prompt, the prompt 
shouldn't return until the program is closed, and any stdour/stderr should 
(with a bit of luck) appear in the command-prompt window (or can be redirected 
to a file). ?I think EDITBIN comes with the Visual C component of DevStudio: 
you may need to install that to get it, if it's not available as a download 
from MSDN.

Graham.

Sent from Samsung Mobile

 Original message 
From: Bart Smissaert <bart.smissa...@gmail.com> 
Date: 09/12/2015  08:32  (GMT+00:00) 
To: SQLite mailing list  
Subject: Re: [sqlite] How to see SQLite debugging information 

> Are you using Excel or VB6?? They're very different things.
I use both. Have done for many years and by now I did indeed figure out
they are not the same :)

> freopen etc.
Thanks, will give that a try.

> can step through the sqlite code in a debug build
That would be great, but not sure how that works. Will ask somebody who
knows these things.
I do in fact have MS VS 2013, but no idea how to step through the code in
debug mode.

RBS

On Wed, Dec 9, 2015 at 1:44 AM, Random Coder  wrote:

> On Tue, Dec 8, 2015 at 4:30 PM, Bart Smissaert 
> wrote:
> > So, what/where is that standard output channel?
> > This is on a Win7 machine. How do I bring up that console window?
> > There is no development environment here. I am running this from Excel.
> > So, I have a standard Windows sqlite3.dll, a std_call dll (to make SQLite
> > accessible to VB6)
>
> Are you using Excel or VB6?? They're very different things.
>
> You could try adding something like the following to somewhere near
> the beginning of sqlite3_initialize
>
> freopen("sqlite_stdout.txt","a",stdout);
> freopen("sqlite_stderr.txt","a",stderr);
>
> This will create two text files for all of sqlite's output.? There
> might be side effects to doing this .. honestly I have no idea if
> it'll work, and finding where the files are created might be
> interesting (they'll be the current directory, but I have no idea what
> that is when you're running Excel, or VB6)
>
> Really, this problem is best solved with a debugger.? Even windbg is
> better than flying blind, and you can step through the sqlite code in
> a debug build even if it's being loaded by something like Excel where
> you don't have the source code.
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] How to see SQLite debugging information

2015-12-09 Thread Random Coder
On Wed, Dec 9, 2015 at 10:14 AM, Adam Devita  wrote:
> To run MS-excell from the command line, you can call it from the full
> path (check version):
>
> "C:\Program Files\Microsoft Office\Office15\Excel.exe"

You can also run "start excel" to launch the current version of Excel.
Both of these are nearly useless, though.  Because the Excel
executable is marked as a GUI application, it won't attach to the
console window.

> I agree with David.  If you want to prove your dll is working (or not
> working), you should attempt to isolate it, for direct testing. Many
> hours of many people's lives have been wasted attempting to indirectly
> test things that have more than 1 unknown or potential source of error
>  in a chain.

Agreed.


[sqlite] How to see SQLite debugging information

2015-12-09 Thread Dominique Devienne
On Wed, Dec 9, 2015 at 3:50 AM, Richard Hipp  wrote:

> On 12/8/15, Bart Smissaert  wrote:
> > So, what/where is that standard output channel?
> SQLite does not have any facilities for debugging in a GUI on Windows.


Any chance to add a way to redirect debugging / troubleshooting output to a
file instead?

Perhaps via a new pragma debug_output = filename ? Would useful in
embedding cases where one does not control the host program. --DD


[sqlite] How to see SQLite debugging information

2015-12-09 Thread Bart Smissaert
That would be very useful and I take it wouldn't be difficult to add.

RBS



On Wed, Dec 9, 2015 at 7:53 AM, Dominique Devienne 
wrote:

> On Wed, Dec 9, 2015 at 3:50 AM, Richard Hipp  wrote:
>
> > On 12/8/15, Bart Smissaert  wrote:
> > > So, what/where is that standard output channel?
> > SQLite does not have any facilities for debugging in a GUI on Windows.
>
>
> Any chance to add a way to redirect debugging / troubleshooting output to a
> file instead?
>
> Perhaps via a new pragma debug_output = filename ? Would useful in
> embedding cases where one does not control the host program. --DD
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] How to see SQLite debugging information

2015-12-09 Thread Bart Smissaert
> The standard output is what displays on your screen when you are in a DOS
box.

OK, thanks, will look into that.

RBS

On Wed, Dec 9, 2015 at 2:50 AM, Richard Hipp  wrote:

> On 12/8/15, Bart Smissaert  wrote:
> > So, what/where is that standard output channel?
> > This is on a Win7 machine. How do I bring up that console window?
> >
>
> The standard output is what displays on your screen when you are in a DOS
> box.
>
> SQLite does not have any facilities for debugging in a GUI on Windows.
>
> --
> D. Richard Hipp
> drh at sqlite.org
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] How to see SQLite debugging information

2015-12-09 Thread Bart Smissaert
> Are you using Excel or VB6?  They're very different things.
I use both. Have done for many years and by now I did indeed figure out
they are not the same :)

> freopen etc.
Thanks, will give that a try.

> can step through the sqlite code in a debug build
That would be great, but not sure how that works. Will ask somebody who
knows these things.
I do in fact have MS VS 2013, but no idea how to step through the code in
debug mode.

RBS

On Wed, Dec 9, 2015 at 1:44 AM, Random Coder  wrote:

> On Tue, Dec 8, 2015 at 4:30 PM, Bart Smissaert 
> wrote:
> > So, what/where is that standard output channel?
> > This is on a Win7 machine. How do I bring up that console window?
> > There is no development environment here. I am running this from Excel.
> > So, I have a standard Windows sqlite3.dll, a std_call dll (to make SQLite
> > accessible to VB6)
>
> Are you using Excel or VB6?  They're very different things.
>
> You could try adding something like the following to somewhere near
> the beginning of sqlite3_initialize
>
> freopen("sqlite_stdout.txt","a",stdout);
> freopen("sqlite_stderr.txt","a",stderr);
>
> This will create two text files for all of sqlite's output.  There
> might be side effects to doing this .. honestly I have no idea if
> it'll work, and finding where the files are created might be
> interesting (they'll be the current directory, but I have no idea what
> that is when you're running Excel, or VB6)
>
> Really, this problem is best solved with a debugger.  Even windbg is
> better than flying blind, and you can step through the sqlite code in
> a debug build even if it's being loaded by something like Excel where
> you don't have the source code.
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] How to see SQLite debugging information

2015-12-09 Thread Simon Slavin

On 9 Dec 2015, at 12:45am, Bart Smissaert  wrote:

> Surely there must be simple way to dump debugging data to say a text file.

Sure.  Run Excel as a command rather than launching it in the Windows GUI.

Simon.


[sqlite] How to see SQLite debugging information

2015-12-09 Thread Simon Slavin

On 9 Dec 2015, at 12:45am, Bart Smissaert  wrote:

> Excel doesn't do much, all the real work is done by that ActiveX dll and I
> have full access to that as I coded that.
> Surely there must be simple way to dump debugging data to say a text file.

Sure.  Run your own program, not one someone else wrote like Excel.

Simon.


[sqlite] How to see SQLite debugging information

2015-12-09 Thread Bart Smissaert
Excel doesn't do much, all the real work is done by that ActiveX dll and I
have full access to that as I coded that.
Surely there must be simple way to dump debugging data to say a text file.

RBS



On Wed, Dec 9, 2015 at 12:37 AM, Simon Slavin  wrote:

>
> On 9 Dec 2015, at 12:35am, Bart Smissaert 
> wrote:
>
> > So, do I need to somehow re-direct this output to a text file?
>
> I don't think it can be done.  If the actual program you're running is
> Excel then you're relying on Excel to do this stuff.  And since Excel is a
> spreadsheet program and not a development environment there's no reason why
> it should show you stdout.
>
> Can you run Excel from a command-line environment ?  Like a program called
> Terminal or cli.exe or something ?
>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] How to see SQLite debugging information

2015-12-09 Thread Simon Slavin

On 9 Dec 2015, at 12:35am, Bart Smissaert  wrote:

> So, do I need to somehow re-direct this output to a text file?

I don't think it can be done.  If the actual program you're running is Excel 
then you're relying on Excel to do this stuff.  And since Excel is a 
spreadsheet program and not a development environment there's no reason why it 
should show you stdout.

Can you run Excel from a command-line environment ?  Like a program called 
Terminal or cli.exe or something ?

Simon.


[sqlite] How to see SQLite debugging information

2015-12-09 Thread Bart Smissaert
So, do I need to somehow re-direct this output to a text file?

RBS



On Wed, Dec 9, 2015 at 12:32 AM, Simon Slavin  wrote:

>
> On 9 Dec 2015, at 12:30am, Bart Smissaert 
> wrote:
>
> > So, what/where is that standard output channel?
> > This is on a Win7 machine. How do I bring up that console window?
> > There is no development environment here. I am running this from Excel.
>
> Then Excel is getting the output.  And since Excel is not a development
> environment I suppose there's no way for you to see the standard output.
>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] How to see SQLite debugging information

2015-12-09 Thread Simon Slavin

On 9 Dec 2015, at 12:30am, Bart Smissaert  wrote:

> So, what/where is that standard output channel?
> This is on a Win7 machine. How do I bring up that console window?
> There is no development environment here. I am running this from Excel.

Then Excel is getting the output.  And since Excel is not a development 
environment I suppose there's no way for you to see the standard output.

Simon.


[sqlite] How to see SQLite debugging information

2015-12-09 Thread Bart Smissaert
So, what/where is that standard output channel?
This is on a Win7 machine. How do I bring up that console window?
There is no development environment here. I am running this from Excel.
So, I have a standard Windows sqlite3.dll, a std_call dll (to make SQLite
accessible to VB6)
a .tlb file an ActiveX dll that is then called from Excel VBA.

RBS

On Wed, Dec 9, 2015 at 12:16 AM, Simon Slavin  wrote:

>
> On 8 Dec 2015, at 10:18pm, Bart Smissaert 
> wrote:
>
> >> on standard output
> > But how this work in concrete steps? Does code have to be added to SQLite
> > to write for example to a text file?
>
> SQLite sends text to the standard output channel while your program is
> making SQLite calls.
>
> You should be able to see this text in a console window.  You bring this
> up various ways depending on your development environment but one example
> is ...
>
> 
>
> If instead you run your program by typing its name into a terminal command
> like the output will appear in your terminal window.
>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] How to see SQLite debugging information

2015-12-09 Thread Simon Slavin

On 8 Dec 2015, at 10:18pm, Bart Smissaert  wrote:

>> on standard output
> But how this work in concrete steps? Does code have to be added to SQLite
> to write for example to a text file?

SQLite sends text to the standard output channel while your program is making 
SQLite calls.

You should be able to see this text in a console window.  You bring this up 
various ways depending on your development environment but one example is ...



If instead you run your program by typing its name into a terminal command like 
the output will appear in your terminal window.

Simon.


[sqlite] How to see SQLite debugging information

2015-12-08 Thread Bart Smissaert
> You did you manage to implement new UDFs if you are not a C programmer?

I forgot to say that the actual callback functions (the actual code that
performs the manipulations) is not in SQLite, but in that ActiveX dll.

RBS

On Tue, Dec 8, 2015 at 10:09 PM, Richard Hipp  wrote:

> On 12/8/15, Bart Smissaert  wrote:
> > Having a problem where 2 UDF's in one SQL cause a crash in my application
> > (Excel)
> > originating from SQLite. This is on Windows 7 with the latest SQLite
> > version.
> > I have a sqlite3.dll compiled with these compiler options:
> >
> > -DSQLITE_DEBUG
> > -DSQLITE_MEMDEBUG
> > -DSQLITE_OMIT_LOOKASIDE
> >
> > I can run PRAGMA vdbe_debug = 1
> >
> > But how do I see now any useful debugging information that could make me
> > understand
> > this crash? I am not a C programmer. Is there an option somewhere to
> dump a
> > log file?
>
> The "PRAGMA vdbe_debug=ON;" command should give you copious amounts of
> debugging information on standard output.  Does it not?
>
> You did you manage to implement new UDFs if you are not a C programmer?
>
> --
> D. Richard Hipp
> drh at sqlite.org
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] How to see SQLite debugging information

2015-12-08 Thread Bart Smissaert
> on standard output
But how this work in concrete steps? Does code have to be added to SQLite
to write for example to a text file?
The Explain command doesn't produce this information or can it?

> You did you manage to implement new UDFs if you are not a C programmer?
Somebody familiar with C added this to a std_call dll and I picked it up
from that via a .tlb file and an ActiveX (VB6) dll.
All working fine, except in that mentioned situation.

RBS






On Tue, Dec 8, 2015 at 10:09 PM, Richard Hipp  wrote:

> On 12/8/15, Bart Smissaert  wrote:
> > Having a problem where 2 UDF's in one SQL cause a crash in my application
> > (Excel)
> > originating from SQLite. This is on Windows 7 with the latest SQLite
> > version.
> > I have a sqlite3.dll compiled with these compiler options:
> >
> > -DSQLITE_DEBUG
> > -DSQLITE_MEMDEBUG
> > -DSQLITE_OMIT_LOOKASIDE
> >
> > I can run PRAGMA vdbe_debug = 1
> >
> > But how do I see now any useful debugging information that could make me
> > understand
> > this crash? I am not a C programmer. Is there an option somewhere to
> dump a
> > log file?
>
> The "PRAGMA vdbe_debug=ON;" command should give you copious amounts of
> debugging information on standard output.  Does it not?
>
> You did you manage to implement new UDFs if you are not a C programmer?
>
> --
> D. Richard Hipp
> drh at sqlite.org
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] How to see SQLite debugging information

2015-12-08 Thread Richard Hipp
On 12/8/15, Bart Smissaert  wrote:
> So, what/where is that standard output channel?
> This is on a Win7 machine. How do I bring up that console window?
>

The standard output is what displays on your screen when you are in a DOS box.

SQLite does not have any facilities for debugging in a GUI on Windows.

-- 
D. Richard Hipp
drh at sqlite.org


[sqlite] How to see SQLite debugging information

2015-12-08 Thread Bart Smissaert
Having a problem where 2 UDF's in one SQL cause a crash in my application
(Excel)
originating from SQLite. This is on Windows 7 with the latest SQLite
version.
I have a sqlite3.dll compiled with these compiler options:

-DSQLITE_DEBUG
-DSQLITE_MEMDEBUG
-DSQLITE_OMIT_LOOKASIDE

I can run PRAGMA vdbe_debug = 1

But how do I see now any useful debugging information that could make me
understand
this crash? I am not a C programmer. Is there an option somewhere to dump a
log file?

RBS


[sqlite] How to see SQLite debugging information

2015-12-08 Thread Random Coder
On Tue, Dec 8, 2015 at 4:30 PM, Bart Smissaert  
wrote:
> So, what/where is that standard output channel?
> This is on a Win7 machine. How do I bring up that console window?
> There is no development environment here. I am running this from Excel.
> So, I have a standard Windows sqlite3.dll, a std_call dll (to make SQLite
> accessible to VB6)

Are you using Excel or VB6?  They're very different things.

You could try adding something like the following to somewhere near
the beginning of sqlite3_initialize

freopen("sqlite_stdout.txt","a",stdout);
freopen("sqlite_stderr.txt","a",stderr);

This will create two text files for all of sqlite's output.  There
might be side effects to doing this .. honestly I have no idea if
it'll work, and finding where the files are created might be
interesting (they'll be the current directory, but I have no idea what
that is when you're running Excel, or VB6)

Really, this problem is best solved with a debugger.  Even windbg is
better than flying blind, and you can step through the sqlite code in
a debug build even if it's being loaded by something like Excel where
you don't have the source code.


[sqlite] How to see SQLite debugging information

2015-12-08 Thread Richard Hipp
On 12/8/15, Bart Smissaert  wrote:
> Having a problem where 2 UDF's in one SQL cause a crash in my application
> (Excel)
> originating from SQLite. This is on Windows 7 with the latest SQLite
> version.
> I have a sqlite3.dll compiled with these compiler options:
>
> -DSQLITE_DEBUG
> -DSQLITE_MEMDEBUG
> -DSQLITE_OMIT_LOOKASIDE
>
> I can run PRAGMA vdbe_debug = 1
>
> But how do I see now any useful debugging information that could make me
> understand
> this crash? I am not a C programmer. Is there an option somewhere to dump a
> log file?

The "PRAGMA vdbe_debug=ON;" command should give you copious amounts of
debugging information on standard output.  Does it not?

You did you manage to implement new UDFs if you are not a C programmer?

-- 
D. Richard Hipp
drh at sqlite.org