|
[Sponsors] |
Is anyone using Visual Studio Code for OF-programming? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 15, 2016, 06:27 |
Is anyone using Visual Studio Code for OF-programming?
|
#1 |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 19 |
I was wondering if anyone is using Visual Studio Code for developing OpenFOAM applications. What are your experiences? Did you get the debugger working? How about indexing the code?
I found that the indexer fails to finish and vscode has full CPU usage, presumably because of the large code base. It also doesn't give me autocompletion. This might be linked to the unfinished indexing. If you're using a different editor/IDE, it would be nice to hear about your experience, especially with regards to autocompletion. I'm not sure if it's even reasonable to expect it on such a huge code base using many templates and macros. |
|
December 15, 2016, 07:02 |
|
#2 | |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
Quote:
Does everything work flawlessly? Certainly not... OpenFoam likes to "#include" files in a copy-paste manner, e.g. to declare common variables in solvers. This is perfectly allowed in C++, but the indexer does not understand it. Consequently, virtually all symbols are unknown, and therefore you have nothing: no autocompletion, no "open declaration", etc. Well, that's depressing. However, with some additional effort, I found a way to "fool Eclipse's indexer". This takes me from this to this. Well, that looks pretty neat! Disadvantages:
Last edited by floquation; December 15, 2016 at 08:46. |
||
December 19, 2016, 16:09 |
Similar for Clion
|
#3 |
Member
Join Date: Oct 2013
Posts: 92
Rep Power: 13 |
CLion (basically Intellij for C++).
I am doing something similar with Clion as floquation has done with Eclipse. However you won't get full IDE capabilities unless you make wmake system of OpenFOAM work with the IDE. I came across an old tutorial which turned Netbeans into a full fledged OF IDE with wmake as the build system integrated with it. But it was for OF-1.6, I don't think that project is maintained anymore |
|
December 19, 2016, 17:28 |
Qt Creator is good too!
|
#4 |
Member
Arvind Jay
Join Date: Sep 2012
Posts: 97
Rep Power: 15 |
I find Qt Creator more flexible.
Cheers |
|
December 26, 2016, 20:36 |
|
#5 |
Member
Hasan Celik
Join Date: Sep 2016
Posts: 64
Rep Power: 10 |
I use Sublime Text. It is also very good editor
|
|
December 27, 2016, 15:12 |
|
#6 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quote:
The only people I know that are possibly still working on this is Hrvoje Jasak at Wikki.co.uk, who had an old version of foam-extend built with MSVC and about a year ago he asked who was interested in this: FOAM on Windows, Linux and Mac - post #4 Nonetheless, I use MSVC occasionally only as a code editor for our work at blueCAPE in developing solvers and utilities, mostly still based on OpenFOAM 2.2.x and the project in MSVC 2008 Express and MSVC 2010 Pro; in both the source code project is configured as a "utility" and not as an actual C++ project, and the included folders from OpenFOAM are only the minimum necessary ("OpenFOAM/lnInclude" and "finiteVolume/lnInclude"). MSVC's auto-complete has a lot of difficulty in figuring out several details about how the OpenFOAM code works, so it has a lot of missing auto-complete features.
__________________
|
||
December 28, 2016, 04:43 |
|
#7 |
Senior Member
Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 123
Rep Power: 18 |
Hi,
I also use qtcreator. Very little hassle, debugging and building works fine and most autocompletion works. And you can ctrl-click on a declaration and it will take you to the source. There is a somewhat outdated guide here https://openfoamwiki.net/index.php/H...with_QtCreator I wrote a script that sets everything up for you. It is posted on the link above but I think it might not work with recent versions of qtcreator. Best regards Nicolas |
|
January 2, 2017, 08:30 |
|
#8 |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 19 |
Thanks for your replies, I will definitely check out QT Creator.
|
|
September 7, 2017, 04:12 |
|
#9 |
New Member
Tong Li
Join Date: Mar 2017
Posts: 2
Rep Power: 0 |
Hi Arvind, I am programming with qt creator too. However, I do not know how to debug in qt creator with GDBOF. Can you give me some tips on how to implement GDB of in qt creator? Thank you very much.
|
|
September 10, 2017, 18:54 |
|
#10 |
New Member
Huipeng Xiao
Join Date: Sep 2017
Posts: 7
Rep Power: 9 |
Most of people perfer to use IDE, but I use vim as text edite, gdb as debug.
Sent from my Le X620 using CFD Online Forum mobile app |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compiling udf in visual studio: unresolved external symbol | ghost82 | Fluent UDF and Scheme Programming | 4 | July 23, 2021 14:59 |
The udf.h headers are unable to open- in VISUAL STUDIO 13 | sanjeetlimbu | Fluent UDF and Scheme Programming | 4 | May 2, 2016 06:38 |
UDF help for Rapid compression machine ECM. | sanjeetlimbu | Fluent UDF and Scheme Programming | 0 | March 17, 2015 23:45 |
Compiling Fluent UDF with Visual Studio | kamnaz | Fluent UDF and Scheme Programming | 0 | August 28, 2014 13:58 |
Error with visual studio installation | akshaymanikjade | FLUENT | 1 | January 31, 2013 00:30 |