pakLebah / paklebah.github.io

This is Mr Bee's aka Pak Lebah's blog on GitHub Pages.
0 stars 0 forks source link

[Free Pascal dan VS Code] comments. #3

Open pakLebah opened 6 years ago

pakLebah commented 6 years ago

Write your comment about my Free Pascal dan VS Code post below. Thank you. 😊

tachibanayui commented 5 years ago

Hello I having problem try to compile the code, Press 'F5' and the terminal popup and show this error

Executing task: fpc ${PROJECTFILE} ${PROCESSOR} ${OPSYSTEM} ${SYNTAX} -Scahi -CroOti -O- -Xg -B -v -glpsw2 -godwarfcpp -Fu${UNITS} -Fi${INCLUDES} -Fl${LIBRARIES} -FE${DEBUG} -FU${OUTPUT} <

fpc.exe : The command parameter was already specified.
At line:1 char:1
+ fpc ${PROJECTFILE} ${PROCESSOR} ${OPSYSTEM} ${SYNTAX} -Scahi -CroOti  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [], ParameterBindingException
    + FullyQualifiedErrorId : ParameterSpecifiedAlready

The terminal process terminated with exit code: 1
pakLebah commented 5 years ago

What is the operating system you are on?

Make sure you're pressing the F5 while you're on the project file tab and everything in the options section of tasks.json has been configured correctly.

tachibanayui commented 5 years ago

I use windows 10. I pasted all the content in tasks.json on this reops

pakLebah commented 5 years ago

Just as I thought. My tasks.json and launch.json are configured for MacOS, since I'm a Mac user. If you want to use it on Windows, you have to change them a bit. For example, I'm using LLDB for the debugger which I believe isn't available on Windows, so you have to use another debugger (gdb? windebug?) and install appropriate extension for it then reconfigure launch.json accordingly.

It's the same for tasks.json as well. For example, the path settings must reconfigure because I was using relative path such as ~. You can't just copy and paste the json files and everything will just works because we're on different operating system. You need to learn the configs and reconfigure them to suit your environment.

JeremyZZQ commented 5 years ago

Hello, I can't open the gist to see the three .json files because gist is blocked. Can you upload them in github , please?

pakLebah commented 5 years ago

Here's the last revision of the gist. If you need the original first revision, just tell me, @JeremyZZQ. Hope it will help you.

File: vscode-fpc-mac-setting-json.zip

JeremyZZQ commented 5 years ago

Thanks a lot. It's help. Now I am using Win10. I am try to setting VS Code for Pascal in Windows 10. I found that these files related a arg "FPC_COMMAND" ("/Users/MacBee/Programs/freepascal/fpc/bin/x86_64-darwin/fpc.sh") in most tasks .In windows system, should I write a bat file replace "fpc.sh"? A lot to learn for a newbie for Pascal. Thanks again.

pakLebah commented 5 years ago

fpc.sh is a caller to FreePascal true compiler and distributed along with the FPC package. It's not created by me nor FPC users. In Unix systems, it's named fpc.sh. In Windows, it's should be named fpc.bat or fpc.exe. Check out your FPC's bin folder.

edsulaiman commented 4 years ago

maaf mas, saya kurang mengerti dengan tutorialnya. apakah bisa untuk membuat tutorial untuk windows dan lazarus sudah terinstall.

pakLebah commented 4 years ago

@edsulaiman: Lah, ini kan tutorial untuk instalasi FPC dan VS Code, bukan untuk Lazarus. Kalo anda gunakan Lazarus, ya jelas ndak cocok. Lazarus itu lebih lengkap fiturnya daripada VS Code. Kalo anda sudah install Lazarus, ngapain pake VS Code lagi? :)

edsulaiman commented 4 years ago

@pakLebah memang benar sih lazarus lebih lengkap, tp saya baru saja pindah dari nodejs/php ke free pascal. saya kurang terbiasa dengan tampilan lazarus, apalagi saya lebih terbiasa dengan console aplication bukan gui application. kalau saya menggunakan vscode, saya rasa lebih nyaman karena fitur text higlight dan extensi lainnya :+1:

pakLebah commented 4 years ago

@edsulaiman: Oh, begitu. Berarti artikel ini memang untuk anda, jika anda pengguna Mac atau Linux. Untuk pengguna Windows, tinggal sesuaikan saja pengaturannya dengan perintah2 di Windows. Berhubung saya bukan pengguna Windows, anda harus mencoba sendiri.

Sejauh ini, apa kendala anda? Bagian mana di artikel yg anda tidak paham?

edsulaiman commented 4 years ago

@pakLebah terima kasih, saya sudah menemukan di youtube cara untuk menyambungkan lazarus ke vscode nya, ditambah dengan tutorial anda, vscode saya lebih pwerfull 👍

nunaaajty commented 3 years ago

halo, Pak. izin bertanya, jika di tasks.json nya ada isinya apa perlu dihapus keseluruhan lalu copy-paste dari Bapak, atau bisa langsung di-paste saja? terima kasih, Pak. maaf saya masih baru di dunia pemrograman :D

pbrena commented 1 year ago

It is very useful, Thanks so much!

sbhoek commented 2 months ago

Selamat malam, Pak Bee! I'm trying very hard to get FreePascal working in VSCode on Windows 10 and I've solved already some problems, but I find it rather tough. I've installed MinGW and GDB. How to get a good configuration now - or in other words a correct launch.json file - is the big problem. Do you maybe know what the file should look like? Or is there anybody else who got it working? Terima kasih banyak (sebelumnya)! Salam dari Belanda!