473,785 Members | 2,234 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Working Directory Problem

I'm developing a plugin for some software. The previous version of the
software didn't require a start in directory to be set. This allowed
me to leave the working directory to the default in the project. Now I
have to get my plugin working with the newer version of the software.
When I start the debugger with it aimed at that program and my program
installed, the program doesn't run properly unless I have the Working
Directory set to the same path as the start in directory for the
shortcut. I guess it uses that for some linking or something like
that, i'm not really sure.

Anyway, when i change the working directory for the program to work,
the debugger doesn't link properly so it's nor hitting any of my
breakpoints. If I don't set the working directory for the program it
doesn't work properly when i start it in the debugger and i can't load
my plugin.

Anyone know what files need to be moved or what has to be done for me
to have the working directory set to the program's director (as needed
for it to run) and have the debugger link properly so that I can get
debugging information as needed?

Dec 2 '05 #1
4 2121
qb******@gmail. com wrote:
If I don't set the working directory for the program it
doesn't work properly when i start it in the debugger and i can't load
my plugin.


Though not what you were asking here's my 5 cents: make a plugin that
doesn't rely in any way on current directory. It can be done (in general
case), and it should be done.
Dec 3 '05 #2
Joe
The plugin doesn't rely on a specific directory. It has to be in a
specific directory in order to be run by the program though. It's MS
VS.NET that needs a specific directory for debugging information. But,
I figure there must be a way around that. That's why i'm here :-D

But yea, finding the debugging info after I change the working
directory is the problem.

Dec 3 '05 #3
qb******@gmail. com wrote:
I'm developing a plugin for some software. The previous version of
the software didn't require a start in directory to be set. This
allowed me to leave the working directory to the default in the
project. Now I have to get my plugin working with the newer version
of the software. When I start the debugger with it aimed at that
program and my program installed, the program doesn't run properly
unless I have the Working Directory set to the same path as the start
in directory for the shortcut. I guess it uses that for some linking
or something like that, i'm not really sure.

Anyway, when i change the working directory for the program to work,
the debugger doesn't link properly so it's nor hitting any of my
breakpoints. If I don't set the working directory for the program it
doesn't work properly when i start it in the debugger and i can't load
my plugin.

Anyone know what files need to be moved or what has to be done for me
to have the working directory set to the program's director (as needed
for it to run) and have the debugger link properly so that I can get
debugging information as needed?


Typically the solution is to add a post-build step to your plug-in project
that copies the .DLL and .PDB files from your project's output directory to
the "plugins" directory of the host application.

If you don't know about post-build steps, reply back with the version of
visual C++ that you're using and I or someone else can help you get a
post-build step set up.

-cd
Dec 3 '05 #4
Joe
I'm using Visual Studio .NET. Thanks a bunch.

Dec 8 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3646
by: Peter Maas | last post by:
My goal is to have the top level of a directory tree in the Python path without touching anything outside the directory. I tried to create .pth files with the top level path in every subdirectory but this doesn't work despite working directory being part of the Python path. Creating the pth file in .../site-packages works but I prefer to have everything inside the directory tree so that removing the tree is sufficient for a complete...
1
7462
by: VM | last post by:
I'm trying to debug an application in the VC dot net compiler and when I begin, I get the error: Unable to start debugging Unable to start program 'c:\myApp\PROGRAM\myApp.exe' 'G:\Program Files\...\myApp\PROGRAM' is not a valid working directory. I know the directory 'G:\...\PROGRAM' does not exist, but how can I change that directory to a valid one?
9
2303
by: Roni Burd | last post by:
Hi!, I'm having a strange issue while deploying a web site with Validator controls. In my development machine the Validators function perfecly and also when I deploy using XCOPY to a web server. The problem seems to arrise when I decided to change the root folder of the web page in IIS to point to a different directory. In this case the validators stop working (although the page continues to work) To be more precise these are the...
11
3756
by: Nurit N | last post by:
This is the third newsgroup that I'm posting my problem. I'm sorry for the multiple posts but the matter becoming urgent. I hope this is the right place for it... I have created a very simple batch file (echo hello world) and was trying to retrieve the standard output but every time I run the code it returns ExitCode as 1.
4
3686
by: Jeff | last post by:
I feel like I should have been able to figure this out but I can't seem to find any references on this topic. It seems like my current working directory is consistently a few directories up from where I am storing the file - not what I would have expected. I would have expected it to be the same directory as the dir with my code - I guess I was wrong because thats not what is happening. On my own computer it wasn't a big problem...
2
2578
by: Jon | last post by:
It appears that (windows) python searches in the current working directory before looking in the local site-packages directory, or that '.' comes first in sys.path? The problem arises when I made the mistake of running a test program from the same directory where I built and installed my package. Python uses the package from the current directory, which misses the pyd files, instead of the site-packages package which has them installed. ...
14
13562
by: gio | last post by:
I have a problem and the solution should works under windows and unix OS. Suppose I have a program ex.c in the directory X (so the current working directory of ex.c is X). Also suppose I have this code fragment: .... char otherpath; char cmd;
3
8243
by: duyanning | last post by:
I have written a pyhton script that will process data file in current working directory. My script is in an different directory to data file. When I debug this script using pdb within emacs, emacs will change the current working directory to the directory which include the script, so my script cannot find the data file. I think this is the problem of emacs because when I start pdb from console directly, it will not change current...
1
1558
by: Michael Torrie | last post by:
I have a small multi-threaded program that spawns a number of threads that each spawn a particular process in a particular temporary directory. My problem is that using os.chdir to change the working directory before popening the process doesn't always work because another thread might change the cwd as it starts, before the process in this thread can start up. I'm currently using popen2.Popen4. Is there a way to properly specify a...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10341
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10095
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9954
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8979
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7502
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.